Skip to content

Commit

Permalink
v1.1.0; === with $.inArray
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Jan 10, 2012
1 parent 4188fef commit 8160df7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jquery.imagesloaded.js
@@ -1,5 +1,5 @@
/*!
* jQuery imagesLoaded plugin v1.0.4
* jQuery imagesLoaded plugin v1.1.0
* http://github.com/desandro/imagesloaded
*
* MIT License. by Paul Irish et al.
Expand Down Expand Up @@ -29,7 +29,7 @@
}

function imgLoaded( event ) {
if ( event.target.src !== blank && $.inArray( this, loaded ) == -1 ){
if ( event.target.src !== blank && $.inArray( this, loaded ) === -1 ){
loaded.push(this);
if ( --len <= 0 ){
setTimeout( triggerCallback );
Expand All @@ -38,6 +38,7 @@
}
}

// if no images, trigger immediately
if ( !len ) {
triggerCallback();
}
Expand Down

0 comments on commit 8160df7

Please sign in to comment.