Browse Source

src : update imagesLoaded to v1.1.0; v1.5.07

pull/139/head v1.5.07
David DeSandro 13 years ago
parent
commit
deaa982869
  1. 31
      jquery.isotope.js
  2. 4
      jquery.isotope.min.js

31
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.5.06 * Isotope v1.5.07
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -1268,7 +1268,7 @@
// ======================= imagesLoaded Plugin =============================== // ======================= imagesLoaded Plugin ===============================
/*! /*!
* jQuery imagesLoaded plugin v1.0.3 * jQuery imagesLoaded plugin v1.1.0
* http://github.com/desandro/imagesloaded * http://github.com/desandro/imagesloaded
* *
* MIT License. by Paul Irish et al. * MIT License. by Paul Irish et al.
@ -1289,32 +1289,35 @@
var $this = this, var $this = this,
$images = $this.find('img').add( $this.filter('img') ), $images = $this.find('img').add( $this.filter('img') ),
len = $images.length, len = $images.length,
blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==',
loaded = [];
function triggerCallback() { function triggerCallback() {
callback.call( $this, $images ); callback.call( $this, $images );
} }
function imgLoaded( event ) { function imgLoaded( event ) {
if ( --len <= 0 && event.target.src !== blank ){ if ( event.target.src !== blank && $.inArray( this, loaded ) === -1 ){
setTimeout( triggerCallback ); loaded.push(this);
$images.unbind( 'load error', imgLoaded ); if ( --len <= 0 ){
setTimeout( triggerCallback );
$images.unbind( '.imagesLoaded', imgLoaded );
}
} }
} }
// if no images, trigger immediately
if ( !len ) { if ( !len ) {
triggerCallback(); triggerCallback();
} }
$images.bind( 'load error', imgLoaded ).each( function() { $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoaded ).each( function() {
// cached images don't fire load sometimes, so we reset src. // cached images don't fire load sometimes, so we reset src.
if (this.complete || this.complete === undefined){ var src = this.src;
var src = this.src; // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f // data uri bypasses webkit log warning (thx doug jones)
// data uri bypasses webkit log warning (thx doug jones) this.src = blank;
this.src = blank; this.src = src;
this.src = src;
}
}); });
return $this; return $this;

4
jquery.isotope.min.js vendored

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