I'm not sure I see a clean way draggable could get involved here, as the delay and distance options keep draggable from kicking in on a click to prevent unintended dragging. Hmm, speaking of, what if you set distance to 0, as the default is 1? http://jqueryui.com/docs/draggable/#option-distance
- Richard On Wed, Jul 29, 2009 at 10:15 AM, WR <[email protected]> wrote: > > I overcame this by binding to the click event for my draggable. I then > set the z-index of the draggable to the maximum z-index of the other > draggables plus 1. > > $("#myDraggable").bind("click", function(e){ > > var largestZ = 1; // this is the min z-index you would want to > apply to the draggable > $(".otherDraggables").each(function(i) { > var currentZ = parseFloat($(this).css("zIndex")); > largestZ = currentZ > largestZ ? currentZ : largestZ; > }); > > $("#myDraggable").css("z-index", largestZ + 1); > }); > > I still think there should be an option to bring a draggable to the > front of a stack on click as opposed to hacking it like this. > > On Jul 13, 5:26 pm, WR <[email protected]> wrote: > > How would I bring adraggableto the top of a stack of draggables on > > theclickevent? The current behaviour only brings adraggableto the > > front when you drag the element. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
