Hmm.. i read it again, and I understood you have different boxes and they all have different z-index, right? So if I undestand correctly when you stop moving one, they all come back to 1, losing the different positions they had.
I think you could add their old z-index variables somewhere in markup, like an attr or something then you can recall them when you need it. It's just a though but I'm not sure it's the best. Good luck. On 1/11/07, Su <[EMAIL PROTECTED]> wrote:
No. The whole problem is that there's a static number in that statement. So eventually, all the panels end up with that same z-index, which makes them revert to stacking in source order. On 1/11/07, Joan Piedra <[EMAIL PROTECTED]> wrote: > > Can't you just use z-index in $(this)?? > > onStop : function() { > > $(this).css("z-index","10000"); > > } > > > > On 1/9/07, Su < [EMAIL PROTECTED]> wrote: > > > I've got something I'm building wherein several boxes will be > > draggable. What I'd like to do is have a function that can be called when > > dragging stops(Interface onStop), or just when a box is clicked that would > > bring it to the top of the stack via the z-index. > > > > Of course, the writers of the CSS spec didn't think to just provide a > > "top" value, so this isn't directly possible. > > I tried something like just: > > > > onStop : function() { > > $('.dragbox').css("z-index","1"); > > $(this).css("z-index","10000"); > > } > > > > but that ends up pretty obviously wrong, since it causes the other > > elements to shuffle. They're all set to "1," and so end up in the natural > > source-order stacking, rather than retaining their relative positions, just > > under the currently active box. > > > > Is there a way to do this that isn't too involved? Speak to me like > > someone who knows just enough JS to break other people's JS *grin* > > > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > > > > > -- > Joan Piedra || Frontend webdeveloper > http://joanpiedra.com/ > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
-- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/