Lazy Load Plugin for jQuery

Written by on September 7th, 2007 in Ajax News.

Mika Tuupola took inspiration from the YUI ImageLoader and created a lazy load plugin for jQuery.

You can see the difference in action by comparing the lazy page to the “normal” agressive image downloader page.

To use the library, after script src’ing it you can simply:

JAVASCRIPT:

  1.  
  2. $(”img”).lazyload();
  3.  

Or you can tweak it via options such as setting a placeholder image, and an event.

JAVASCRIPT:

  1.  
  2. $(”img”).lazyload({
  3.     placeholder : “img/grey.gif”,
  4.     event : “click”
  5. });
  6.  

Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/153438140/lazy-load-plugin-for-jquery

Leave a Reply

You must be logged in to post a comment.



Site Navigation