I have two jquery plugin of my own and the elements created by the two plugin had its own z-index value.E.g:
// auto increase the z-index value
// auto increase the z-index to the maximum of their own when I drag it.
element1 created by plugin1 and has the z-index:1;
element2 created by plugin1 and has the z-index:2;
....
// auto increase the z-index value
// auto increase the z-index to the maximum of their own when I drag it.
element2 created by plugin2 and has the z-index:1;
element2 created by plugin2 and has the z-index:2;
.....
and both of them can be draggable,so when I click one of them I want its z-index value to be the maximum of all the elements I created.But now the z-index were separated!
I am using JQuery UI draggable plugin but don’t like the stack option !
Thank you very much!!
Try using name spaces
for eg in plugin 1
you can define
This can be retrieved in any part of the js
but make sure its defined before document.ready