scriptaculous
scriptaculous copied to clipboard
Draggable revert and ghosting error
Whilst creating a Draggable element and initializing it with both ghosting set to true and revert set to true the parentNode of the clone is never found and thus errors out.
A simple test like, "new Draggable('demo_element', { revert: true, ghosting: true });" will blow up in your face.
Sorry for a long response time - but you can fix the element after the revert by passing an anonymous function to revert and then reseting position and zIndex and returning false like below
new Draggable(div, {
"revert" : function(e){
e.style.position = "relative";
e.style.zIndex = '';
return false;
},
"ghosting" : true
});