]> source.dussan.org Git - jquery-ui.git/commitdiff
Removing unnecessary wrapping of this in draggable's stack option handling.
authorTJ VanToll <tj.vantoll@gmail.com>
Wed, 13 Feb 2013 02:27:21 +0000 (21:27 -0500)
committerTJ VanToll <tj.vantoll@gmail.com>
Wed, 13 Feb 2013 02:27:21 +0000 (21:27 -0500)
ui/jquery.ui.draggable.js

index b8d21bd80a1f47cfa57bb2df3259996aa16fc632..8b388d16650e0ce82d1189a8e3030d7db3f41f25 100644 (file)
@@ -908,9 +908,8 @@ $.ui.plugin.add("draggable", "snap", {
 
 $.ui.plugin.add("draggable", "stack", {
        start: function() {
-
                var min,
-                       o = $(this).data("ui-draggable").options,
+                       o = this.data("ui-draggable").options,
                        group = $.makeArray($(o.stack)).sort(function(a,b) {
                                return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
                        });
@@ -921,8 +920,7 @@ $.ui.plugin.add("draggable", "stack", {
                $(group).each(function(i) {
                        $(this).css("zIndex", min + i);
                });
-
-               $(this[0]).css("zIndex", (min + group.length));
+               this.css("zIndex", (min + group.length));
        }
 });