Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery plugin for lazy-loading/lazy-evaluation?

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).

like image 503
Anton Kuzmin Avatar asked Feb 28 '23 00:02

Anton Kuzmin


2 Answers

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).

like image 108
Anton Kuzmin Avatar answered Mar 08 '23 10:03

Anton Kuzmin


Lazy Load does lazy loading of images.

like image 24
Nikolas Stephan Avatar answered Mar 08 '23 10:03

Nikolas Stephan