Permalink
Browse files

v1.1.0; === with $.inArray

  • Loading branch information...
1 parent 4188fef commit 8160df728f8925ea8bfb7c530b8feed7addc4b36 @desandro committed Jan 10, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 jquery.imagesloaded.js
View
@@ -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.
@@ -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 );
@@ -38,6 +38,7 @@
}
}
+ // if no images, trigger immediately
if ( !len ) {
triggerCallback();
}

0 comments on commit 8160df7

Please sign in to comment.