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>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745473971a4629259.html
评论列表(0条)