vvo / lazyload

:bullettrain_front: Lazyload images, iframes, widgets with a standalone JavaScript lazyloader
https://vvo.github.io/lazyload/
MIT License
938 stars 158 forks source link

jQuery Mobile issue #57

Closed travisbotello closed 10 years ago

travisbotello commented 10 years ago

Hey,

thanks for this awesome script. However I am having problems getting this to work with iframes in jQuery Mobile Framework. It immediately replaces the src attributes with the data-src values although no iframe is visible in the current viewport. When I isolate the code in a normal html5 dom it is working without any problems. Any ideas?

Thanks in advance Travis

vvo commented 10 years ago

Can you provide a working example?

Thank you

travisbotello commented 10 years ago

I debugged the problem. It's caused by this css rule shipped in the structure css file of jquery mobile (http://code.jquery.com/mobile/1.3.2/jquery.mobile.structure-1.3.2.css):

.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { display: none; }

I overwrote it with display: inline, causing some style issues, but it lazyload is working now.

vvo commented 10 years ago

Great you debug it, thanks a lot, now closing