简体   繁体   English

jQuery-幻灯片示例

[英]JQuery - Slide Example

I want to perform a simple slide motion on an HTML element. 我想对HTML元素执行简单的幻灯片运动。 JQuery is already available on the site in question so the next logical step for me was to look at their documentation. 有关该站点的信息,现在已经可以使用JQuery,因此对我来说,下一步的逻辑就是查看其文档。

JQuery - Slide down jQuery-向下滑动

When I check out their demo however, it doesn't seem to be functioning. 但是,当我查看他们的演示时,它似乎没有运行。 In firebug they have an error; 在萤火虫中,他们有一个错误;

missing ) after argument list
wyciwyg://0/http://docs.jquery.com/UI/Effects/Slide
Line 18

Whilst the error seems simple, I can't work out how to correct it (On thier site by editing the JS). 尽管错误看起来很简单,但我无法解决如何纠正错误(在他们的网站上通过编辑JS)。 On my own site using the same example an error is found in the JQuery 1.4.2 script itself; 在我自己的网站上,使用相同的示例,在JQuery 1.4.2脚本本身中发现了一个错误;

jQuery.easing[specialEasing || defaultEasing] is not a function
file:///home/gav/ee-workspaces/web/site/php/jquery-1.4.2.js
Line 5854

I don't mean to sound lazy / rude but what's going on? 我的意思不是听起来懒惰/粗鲁,但是这是怎么回事? Is the JQuery site and newest release actually broken, I doubt it, what am I doing wrong? 我怀疑JQuery网站和最新版本是否确实损坏,我在做什么错? I'm a CS grad with no real web dev experience so I'm not used to this method of debugging, where should I start with this? 我是CS毕业生,没有真正的Web开发经验,所以我不习惯这种调试方法,我应该从哪里开始呢?

Thanks, 谢谢,

Gav GAV

在这里查看工作示例。

I had this error 我有这个错误

jQuery.easing[specialEasing || defaultEasing] is not a function
file:///home/gav/ee-workspaces/web/site/php/jquery-1.4.2.js
Line 5854

with jquery-1.4.2.js. 与jquery-1.4.2.js。

The simple solution is to replace your jquery include with: 简单的解决方案是将您的jquery include替换为:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

Or the latest version of Jquery available; 或可用的最新版本的Jquery; http://code.jquery.com/jquery-latest.min.js http://code.jquery.com/jquery-latest.min.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM