hongaar/unveil2

Unveil never or unreliably triggers inside carousels, dropdowns.

Opened this issue · 1 comments

I've been using unveil successfully across an entire site, however when using an img tag inside a carousel, (specifically nivoslider) unveil loads the placeholder pixel and only switches to the src if a scroll is triggered while the image is displayed in the carousel.

If I use a div it will set the background image from data-src or breakpoint-src immediately, this issue seems to be specific to img tags.

Could unveil instead more reliably check that a parent element is visible? Even better if we could set the trigger element via a data attribute, that way I could get unveil to load the entire carousel as soon as it appears on screen, ensuring transitions animate correctly.

Thanks for this. Could you provide an example of this behaviour on i.e. jsFiddle?