From 8ca23bd817bd763e261b99d5380857951dceeb16 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 1 Sep 2011 16:43:37 +0300 Subject: [PATCH] Rename `_this` into `$this` for consistency with `$images`. Also, use `$this` instead of the `this` keyword where possible, for better minification. --- jquery.imagesloaded.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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