Answer the question
In order to leave comments, you need to log in
How to set up lazyLoad Jquery to load the moment it appears on the screen?
Good afternoon.
There are many pictures in divs loaded by LazyLoad.
Added "live" filtering through jQuery filter.
When filtering, scrolling does not occur, and images are not loaded.
How to support both scroll and filter events.
Answer the question
In order to leave comments, you need to log in
$("img.lazy").lazyload({
threshold : 200
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$('#' + $(e.target).attr('href').substr(1) + ' img.lazy').lazyload({threshold: 200});
})
Most filtering plugins fire some sort of event when the content changes (like layout.shuffle in shuffle.js, etc.) that you can subscribe to and call $(window).trigger('scroll') to fire a LazyLoad ( or in the case of the LazyLoadXT plugin, simply add this event to the list of events to which it should respond).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question