@ -1,5 +1,5 @@
/ * *
/ * *
* Isotope v1 . 4.110823
* Isotope v1 . 4.110825
* An exquisite jQuery plugin for magical layouts
* An exquisite jQuery plugin for magical layouts
* http : //isotope.metafizzy.co
* http : //isotope.metafizzy.co
*
*
@ -1174,50 +1174,49 @@
} ;
} ;
// ======================= imagesLoaded Plugin ===============================
// ======================= imagesLoaded Plugin ===============================
// https://gist.github.com/964345
// https://github.com/desandro/imagesloaded
// $('img.photo',this ).imagesLoaded(myFunction)
// $('#my-container' ).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
// modified by yiannis chatzikonstantinou.
// callback function gets image collection as argument
// `this` is the container
// original:
// original: mit license. paul irish. 2010.
// mit license. paul irish. 2010.
// contributors: Oren Solomianik, David DeSandro, Yiannis Chatzikonstantinou
// webkit fix from Oren Solomianik. thx!
// callback function is passed the last image to load
$ . fn . imagesLoaded = function ( callback ) {
// as an argument, and the collection as `this`
var $images = this . find ( 'img' ) ,
len = $images . length ,
_this = this ,
blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==' ;
$ . fn . imagesLoaded = function ( callback ) {
function triggerCallback ( ) {
var elems = this . find ( 'img' ) ,
callback . call ( _this , $images ) ;
elems _src = [ ] ,
}
self = this ,
len = elems . length ;
if ( ! elems . length ) {
function imgLoaded ( ) {
callback . call ( this ) ;
if ( -- len <= 0 && this . src !== blank ) {
return this ;
setTimeout ( triggerCallback ) ;
$images . unbind ( 'load error' , imgLoaded ) ;
}
}
}
elems . one ( 'load error' , function ( ) {
if ( ! len ) {
if ( -- len === 0 ) {
triggerCallback ( ) ;
// Rinse and repeat.
}
len = elems . length ;
elems . one ( 'load error' , function ( ) {
$images . bind ( 'load error' , imgLoaded ) . each ( function ( ) {
if ( -- len === 0 ) {
// cached images don't fire load sometimes, so we reset src.
callback . call ( self ) ;
if ( this . complete || this . complete === undefined ) {
}
var src = this . src ;
} ) . each ( function ( ) {
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
this . src = elems _src . shift ( ) ;
// data uri bypasses webkit log warning (thx doug jones)
} ) ;
this . src = blank ;
this . src = src ;
}
}
} ) . each ( function ( ) {
elems _src . push ( this . src ) ;
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
// data uri bypasses webkit log warning (thx doug jones)
this . src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" ;
} ) ;
} ) ;
return this ;
return this ;