jQuery 中的特效不起作用,在源代码中发现错误
这显示了我收到的错误,我无论我使用什么 jquery javascript 文件,都可以得到它,只取决于行,这恰好是:
this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
出现错误的代码:
$("#mainWrapper").show("bounce", { direction:"down", times:"3" }, 300);
似乎所有 .effect 都会发生,但是 .slide 和 .fade 工作正常...
如果我将其称为 mainWrapper 而不是 #mainWrapper,则不会收到错误,但效果仍然不会发生。
不确定为什么会发生这种情况,有什么想法吗?如果您需要更多信息,请告诉我。
That shows the error I'm getting, I get it no matter what jquery javascript file I'm using, just depends on the line, which happens to be:
this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
The code that's getting the error:
$("#mainWrapper").show("bounce", { direction:"down", times:"3" }, 300);
Seems to happen with all .effect, however .slide and .fade works fine...
I don't get the error if I refer to it as mainWrapper, rather than #mainWrapper, however the effect still doesn't occur.
Unsure of why it's happening, any ideas? Let me know if you need more information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否记得加载 jQuery UI 库?
“反弹”效果是 jQueryUI 库的一部分,请查看此处以供参考。 JSFiddle 演示此处。
Did you remember to load the jQuery UI library?
The "bounce" effect is a part of the jQueryUI lib, have a look here for reference. JSFiddle demo here.
请尝试删除时间属性中的引号。它接受整数值而不是字符串。
我想会解决问题。
Please try to remove quotes in time property. It accepts integer value not string.
will solve problem I guess.