1. Please see the phenomenon:
https://codepen.io/xuyu/proje...
2. The effect I want to achieve is to copy the dragged element to the specified area without deleting the dragged element.
阿神2017-06-22 11:55:56
document.addEventListener("drop", function( event ) {
// prevent default action (open as link for some elements)
event.preventDefault();
// move dragged elem to the selected drop target
if ( event.target.className == "landingArea" ) {
event.target.style.background = "";
//dragged.parentNode.removeChild( dragged );
$(event.target).append($(dragged).clone().css('opacity', 1))
}
}, false);