I am trying to load images on demand, in order to prevent downloading of unneeded images. I am using jQuery. So far, this is what I have come up with:
$(\'#
There is a good library: JAIL
Selected images will be downloaded if they are visible and when they are visible inside the viewport (rectangular viewing region). Images can be loaded after an event is triggered (such as click, mouseover, and scroll) or after a specified delay. It's advisable to call jail() after the DOM has been constructed (document ready).