diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2013-02-11 23:29:48 -0500 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2013-02-11 23:29:48 -0500 |
commit | c32bebd1bd28d158b017bb1dd7f95fb1d8a8d567 (patch) | |
tree | f6eb354ca38bcb6f60b5ad0899a79bc7d8b6079a /ui/jquery.ui.draggable.js | |
parent | ab408c9b82430e7a65a9269441cc0c0e2af95770 (diff) | |
download | jquery-ui-c32bebd1bd28d158b017bb1dd7f95fb1d8a8d567.tar.gz jquery-ui-c32bebd1bd28d158b017bb1dd7f95fb1d8a8d567.zip |
Draggable: Account for z-index set in CSS for the stack option. Fixed #9077 - Draggable: stack option resets the z-index
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 9a31add7c..b8d21bd80 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -917,13 +917,12 @@ $.ui.plugin.add("draggable", "stack", { 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[0]).css("zIndex", (min + group.length)); } }); |