apply at the same time draggable&resizable jquery element (and how to change Z-Index too!)

 

I wanted to Implement the management of the layers in our new project, thepiclab.com. But I have some problems..

First we need to make a image or a DIV draggable and resizable properties at the same time. It seemed it was impossible, if we apply the resizable plugin, draggable doens't works and this ruined all our work.

Tis doesn't works!!! $("# div_todrag_resize"). resizable (). draggable ();

 

The solution, was as follows, just apply the parent function.:

$( "# div_todrag_resize"). resizable (). parent (). draggable ();
 

Apllying th parent() to resizable, all works fine, resizable and draggable.
Once I solved this inconvenience, I tried to change the Z-index CSS property using jquery or using getElementById. The Z-index of the images changed but the images where at the same position!!

As we solve it? Reapply the parent () property. It seems that draggable or resizable jquery plugins creates a DIV  to make the virtual dragging or resizing and this div is called by parent().

This is the solution to change a jquery resizable and draggable Z-index of a image or DIV:

$ ( "# div_todrag_resize.") parent (). css ((
'z-index': '2000 '
));

That's all folks!

Formato: 
htm