Permalink
Browse files

event.target instead of this in imgLoaded; v1.0.4

Fixes #5
  • Loading branch information...
desandro committed Sep 17, 2011
1 parent e8117ce commit 68ea2800416cda4c8b1db65654e691a4d96d3fe1
Showing with 3 additions and 3 deletions.
  1. +3 −3 jquery.imagesloaded.js
View
@@ -1,5 +1,5 @@
/*!
- * jQuery imagesLoaded plugin v1.0.3
+ * jQuery imagesLoaded plugin v1.0.4
* http://github.com/desandro/imagesloaded
*
* MIT License. by Paul Irish et al.
@@ -27,8 +27,8 @@
callback.call( $this, $images );
}
- function imgLoaded() {
- if ( --len <= 0 && this.src !== blank ){
+ function imgLoaded( event ) {
+ if ( --len <= 0 && event.target.src !== blank ){

This comment has been minimized.

Show comment Hide comment
@gnarf

gnarf Sep 23, 2011

Is it just me -- or should this --len only be performed if event.target.src !== blank -- in which case - it should be on the right hand side of the &&

@gnarf

gnarf Sep 23, 2011

Is it just me -- or should this --len only be performed if event.target.src !== blank -- in which case - it should be on the right hand side of the &&

setTimeout( triggerCallback );
$images.unbind( 'load error', imgLoaded );
}

0 comments on commit 68ea280

Please sign in to comment.