javascript - Get previous element after drop -
is parent element draggable element removed somewhere stored?
i have tried create work arounds on dragstart either
datatransfer.setdata
or
datatransfer.addelement
with setdata element gets converted string addelement exists in firefox
for easier editing i'm adding jsfiddle
http://jsfiddle.net/
i ended saving in dragstart event
var parentelement = e.target.parentelement; e.datatransfer.setdata('parentid', parentelement.id);
and getting parent in drop event
var parentitem = document.getelementbyid(e.datatransfer.getdata('parentid'));
javascript javascript-events html5-draggable
No comments:
Post a Comment