jQuery-Sonar icon indicating copy to clipboard operation
jQuery-Sonar copied to clipboard

Programmatically changing element position?

Open emumanu opened this issue 9 years ago • 1 comments

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 avatar May 10 '15 09:05 emumanu

@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

infn8 avatar Dec 15 '15 05:12 infn8