JQuery plugin for lazy-loading/lazy-evaluation?
jquery, jquery-plugins, lazy-evaluation, lazy-loading
Solution
http://plugins.jquery.com/project/LazyReady
Lazy Ready A plugin designed to delay code initialization until specified DOM element(s) is interacted with (hovered/focused).
Problem
Is there such jQuery plugin? More specific: I want to use some elegant and easy way to postpone some code execution until it's really needed (some event happens). And when this event happens, the postponed code should get executed only once. Some kind of lazy initialization. For example, apply some animation to an element not when document is ready, but when user hovers over that element. I know how to do it the manual way but I don't like it because I have to think about checking and setting 'initialized' flag before executing anonymous function. I was wondering if it's already done (bug free, with some tasty features).