Browse Source

src : imagesLoaded v1.0.3

pull/96/head
David DeSandro 14 years ago
parent
commit
f958fbe23b
  1. 25
      jquery.isotope.js
  2. 4
      jquery.isotope.min.js

25
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.4.110825 * Isotope v1.4.110901
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -1175,26 +1175,32 @@
// ======================= imagesLoaded Plugin =============================== // ======================= imagesLoaded Plugin ===============================
// https://github.com/desandro/imagesloaded /*!
* jQuery imagesLoaded plugin v1.0.3
* http://github.com/desandro/imagesloaded
*
* MIT License. by Paul Irish et al.
*/
// $('#my-container').imagesLoaded(myFunction) // $('#my-container').imagesLoaded(myFunction)
// or
// $('img').imagesLoaded(myFunction)
// execute a callback when all images have loaded. // execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images // needed because .load() doesn't work on cached images
// callback function gets image collection as argument // callback function gets image collection as argument
// `this` is the container // `this` is the container
// original: mit license. paul irish. 2010.
// contributors: Oren Solomianik, David DeSandro, Yiannis Chatzikonstantinou
$.fn.imagesLoaded = function( callback ) { $.fn.imagesLoaded = function( callback ) {
var $images = this.find('img'), var $this = this,
$images = $this.find('img').add( $this.filter('img') ),
len = $images.length, len = $images.length,
_this = this,
blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
function triggerCallback() { function triggerCallback() {
callback.call( _this, $images ); callback.call( $this, $images );
} }
function imgLoaded() { function imgLoaded() {
@ -1219,9 +1225,10 @@
} }
}); });
return this; return $this;
}; };
// helper function for logging errors // helper function for logging errors
// $.error breaks jQuery chaining // $.error breaks jQuery chaining
var logError = function( message ) { var logError = function( message ) {

4
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save