当我查看火虫控制台时,我收到此错误.我想在wordpress上制作一个滑块.我正在使用本地主机,所以我无法准确地显示出什么.但是,当滑块只是在wordpress之外的html文件中时,它可以工作.在wordpress中,它给了我那个错误.任何有关问题的见解都将受到高度赞赏.谢谢.
col*_*ain 51
为了节省每个人一些时间.打开你的Jquery缓动插件文件并将代码包装在里面:
$(document).ready(function() {
Code goes here...
});
Run Code Online (Sandbox Code Playgroud)
puc*_*chu 17
问题是
swing: function (x, t, b, c, d) {
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
}
Run Code Online (Sandbox Code Playgroud)
这个函数中的jQuery不能等于jQuery.extend( jQuery.easing,已经应用的jQuery .
jQuery为$用...包装代码
(function($, undefined) {
...
}) (jQuery);
Run Code Online (Sandbox Code Playgroud)你导入了jQuery缓动插件吗?就像是
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
在你的页面?
if(typeof jQuery.easing[jQuery.easing.def] == 'function'){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
}
Run Code Online (Sandbox Code Playgroud)
在 easing.js 上的 swing() 函数上试试这个代码
| 归档时间: |
|
| 查看次数: |
55022 次 |
| 最近记录: |