Skip to content

Commit 3d39d8c

Browse files
committed
Removing unnecessary wrapping of this in draggable's stack option handling.
1 parent c32bebd commit 3d39d8c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ui/jquery.ui.draggable.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,8 @@ $.ui.plugin.add("draggable", "snap", {
908908

909909
$.ui.plugin.add("draggable", "stack", {
910910
start: function() {
911-
912911
var min,
913-
o = $(this).data("ui-draggable").options,
912+
o = this.data("ui-draggable").options,
914913
group = $.makeArray($(o.stack)).sort(function(a,b) {
915914
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
916915
});
@@ -921,8 +920,7 @@ $.ui.plugin.add("draggable", "stack", {
921920
$(group).each(function(i) {
922921
$(this).css("zIndex", min + i);
923922
});
924-
925-
$(this[0]).css("zIndex", (min + group.length));
923+
this.css("zIndex", (min + group.length));
926924
}
927925
});
928926

0 commit comments

Comments
 (0)