admin管理员组文章数量:1426286
I'm trying to use the jQuery's delayed image loading plugin to lazy load my images. While trying to do so I'm getting the error Uncaught TypeError: undefined is not a function
on the 2nd line of my code.
Here is my JS code
jQuery(document).ready(function() {
jQuery("img.lazy").lazy({
effect: "fadeIn",
effectTime: 1500
});
});
This script is placed at the bottom of my page in a JS file along with some of my other scripts.
I have the following scripts in my <head>
and I've verified that the files are indeed linked properly.
<script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui.js"></script>
I have tried most of the solutions given to this problem on SO but I haven't had any success.
I'm trying to use the jQuery's delayed image loading plugin to lazy load my images. While trying to do so I'm getting the error Uncaught TypeError: undefined is not a function
on the 2nd line of my code.
Here is my JS code
jQuery(document).ready(function() {
jQuery("img.lazy").lazy({
effect: "fadeIn",
effectTime: 1500
});
});
This script is placed at the bottom of my page in a JS file along with some of my other scripts.
I have the following scripts in my <head>
and I've verified that the files are indeed linked properly.
<script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui.js"></script>
I have tried most of the solutions given to this problem on SO but I haven't had any success.
Share Improve this question asked Aug 13, 2014 at 18:53 Yin YangYin Yang 1,8063 gold badges28 silver badges48 bronze badges1 Answer
Reset to default 3jQuery lazy
is a separate plugin, and is not available part of either jquery
, or jquery-ui
You need to download and add a reference along with the rest of the jquery libraries
<script type="text/javascript" src="/static/js/jquery.lazy.min.js"></script>
本文标签: javascriptUncaught TypeError undefined is not a function on using jQuerylazy()Stack Overflow
版权声明:本文标题:javascript - Uncaught TypeError: undefined is not a function on using jQuery.lazy() - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745473971a2659875.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论