Hi i have two divs(lets say div1 and div2) one with flip animation on hover and the other div flips on toggle click. Now my basic idea is to swap two divs on drag and drop. i tried with the javascript below with this JS everything is working well except that my swapped divs are no more animating on hover and flip. and i also inspected the elements in chrome the swapped divs are mismatching with the original divs but the swapped divs are not animating.
thanks in anticipation.
> function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
var drp=ev.currentTarget.id;
var drag=ev.dataTransfer.getData("text");
var drp1=document.getElementById(drp);
var drag1=document.getElementById(drag);
var drp2=drp1.innerHTML;
drp1.innerHTML=drag1.innerHTML;
drag1.innerHTML=drp2;
}