diff --git a/jquery.imagesloaded.js b/jquery.imagesloaded.js index c97c72b..3082a87 100644 --- a/jquery.imagesloaded.js +++ b/jquery.imagesloaded.js @@ -17,13 +17,13 @@ (function($, undefined) { $.fn.imagesLoaded = function( callback ) { - var $images = this.find('img'), + var $this = this, + $images = $this.find('img'), len = $images.length, - _this = this, blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; function triggerCallback() { - callback.call( _this, $images ); + callback.call( $this, $images ); } function imgLoaded() { @@ -48,6 +48,6 @@ } }); - return this; + return $this; }; })(jQuery); \ No newline at end of file