I have an element which is draggable and an element which is droppable. Once the dragged item is dropped on the dropzone I am trying to execute the following jquery psuedo code:
if(draggedelement == value){
$(draggedelement).hide();
}
else{
$(draggedelement).revert();
}
where the revert()
function moves the dragged item back to its original postion.
How would one accomplish this?
P.S. I am aware of the draggable 'revert' option, however this only activates if the dragged item does not make it to the dropzone.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…