From c32bebd1bd28d158b017bb1dd7f95fb1d8a8d567 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Mon, 11 Feb 2013 23:29:48 -0500 Subject: Draggable: Account for z-index set in CSS for the stack option. Fixed #9077 - Draggable: stack option resets the z-index --- ui/jquery.ui.draggable.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui') 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)); } }); -- cgit v1.2.3