David DeSandro e8117cec1c filter for images as well; v1.0.3
move other comments for better uglification

So it doesn't break for people switching from @paulirish's old version.
2011-09-01 17:58:22 -04:00
2011-09-01 17:58:22 -04:00

imagesLoaded

A small jQuery plugin that triggers a callback after all the selected/child images have been loaded. Because you can't do .load() on cached images.

$('#my-container').imagesLoaded( function( $images ) {
  // callback provides one argument, the jQuery object of child images
  console.log( $images.length + ' images have been loaded in ' + this )
});

You can call imagesLoaded on a set of images as well.

$('.article img').imagesLoaded( myFunction );

See demo

Used in Masonry and Isotope.

Contribute

It ain't easy knowing when images have loaded. Every browser has its own little quirks that make this a difficult task to develop a cross-browser solution. Pull requests, testing, issues, and commentary are all highly encouraged (pleasepleaseplease) and very much appreciated.

Contributors

Description
No description provided
Readme 940 KiB
Languages
JavaScript 71.2%
HTML 25.9%
CSS 2.9%