diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2013-02-12 21:28:23 -0500 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2013-02-12 21:28:23 -0500 |
commit | a5469750aede461881bff0df68d7805ddd4c65a9 (patch) | |
tree | d62bc38e46eb5c28d38c2be6528b95fb19a291af /ui | |
parent | bce9da420646b6cee859475af6616aa9107f0158 (diff) | |
parent | 3d39d8c32f7b4777c8272fbdd9d24d54ca00dffc (diff) | |
download | jquery-ui-a5469750aede461881bff0df68d7805ddd4c65a9.tar.gz jquery-ui-a5469750aede461881bff0df68d7805ddd4c65a9.zip |
Merge branch 'draggable_fix_9077'
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.draggable.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 9a31add7c..8b388d166 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -908,22 +908,19 @@ $.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); }); if (!group.length) { return; } - min = parseInt(group[0].style.zIndex, 10) || 0; + min = parseInt($(group[0]).css("zIndex"), 10) || 0; $(group).each(function(i) { - this.style.zIndex = min + i; + $(this).css("zIndex", min + i); }); - - this[0].style.zIndex = min + group.length; - + this.css("zIndex", (min + group.length)); } }); |