jQuery-Sonar
jQuery-Sonar copied to clipboard
Programmatically changing element position?
Hello,
first thank you for this great plugin. I have a page with a lot of divs, and each one has an image. The images are tracked with sonar to lazy load them and If the divs don't change their positions, everything works ok. However, I have a dropdown to filter the items to show, and when I select a filter, the divs change their position, and some times the images don't get displayed. Probably that repositioning makes sonar to fail. Is there anything I could do to have it working in that scenario?
Thank you
@emumanu I would suggest 1 of 2 things. Either:
after filtering trigger the window's scroll event
$(window).trigger('scroll');
Or: After filtering run though each visible item and run the sonar.detect() method