]> source.dussan.org Git - jquery-ui.git/commitdiff
Magnifier: Partial cleanup.
authorScott González <scott.gonzalez@gmail.com>
Tue, 15 Jul 2008 02:00:34 +0000 (02:00 +0000)
committerScott González <scott.gonzalez@gmail.com>
Tue, 15 Jul 2008 02:00:34 +0000 (02:00 +0000)
ui/ui.magnifier.js

index f49f8489fd07c3071b9a92aea52f703eb26faba7..393a6b6f7bdd1ff251fba664cc476cd0cacbe1f3 100644 (file)
@@ -79,21 +79,20 @@ $.widget("ui.magnifier", {
        },\r
        \r
        reset: function(e) {\r
-               var o = this.options, c;\r
+               var o = this.options;\r
                \r
-               for (var i=0; i < this.items.length; i++) {\r
-                       c = this.items[i];\r
-                       \r
-                       $(c[0]).css({\r
-                               width: c[2][0],\r
-                               height: c[2][1],\r
-                               top: (c[3] ? c[3].top : 0),\r
-                               left: (c[3] ? c[3].left : 0)\r
+               $.each(this.items, function() {\r
+                       var item = this;\r
+                       $(item[0]).css({\r
+                               width: item[2][0],\r
+                               height: item[2][1],\r
+                               top: (item[3] ? item[3].top : 0),\r
+                               left: (item[3] ? item[3].left : 0)\r
                        });\r
                        \r
-                       (o.opacity && $(c[0]).css('opacity', o.opacity.min));\r
-                       (o.zIndex && $(c[0]).css("z-index", ""));\r
-               }\r
+                       (o.opacity && $(item[0]).css('opacity', o.opacity.min));\r
+                       (o.zIndex && $(item[0]).css("z-index", ""));\r
+               });\r
        },\r
        \r
        magnify: function(e) {\r