Reputation: 1
I have multiple div's with class="strip" and in each div there are many images in the lazyload style. (the class is set to overflow='hidden' so that the browser only see's a part of the images, these are the ones lazyload will load)
Then I call lazyload:
$(function(){
$("img.lazy").lazyload({
container: $(".strip")
});
});
It works perfectly on the first horizontal strip of images, in the next '.strip' classes after that it fails. It only runs on 1 class and quits as if I called an ID instead of a Class. Any ideas on what I did wrong?
Upvotes: 0
Views: 414
Reputation: 3171
THe problem you have is that a div class is different to that of a div ID. You need to use # for ID's and . for Classes, see the code example below.
<script>
$(function(){
$("img.lazy").lazyload({
container: $('.strip', '#strip')
});
});
</script>
Upvotes: 1