This is the effect: before dragging
After:
On the code:
<! DOCTYPE html>true] { -moz-user-Select:none; -khtml-user-drag:element; Cursor:move; } *:-khtml-Drag {background-color:rgba (238,238,238, 0.5); } A {text-Decoration:none; Color: #000; width:120px; border:3px Dashed #999; padding:10px; Display:inline-Block; Transition:all 1s; Position:absolute; top:10px; }. container {position:relative; } a.move {-webkit-transform:scale3d (1.1, 1.1, 1.1 ); } a:hover:after {content:' (Drag Me) '; Color:green}</style> varOrigin, is_moving =false; $(". Container"). Find ("a"). On ("Drop"), function(e) {varOrigin_pos = $ (origin). Position ();varTarget_pos =$ (e.target). Position (); $ (Origin). addclass ("Move"). Animate (Target_pos, "fast", function() {Console.log ( This); $( This). Removeclass ("Move"); }); $ (e.target). addclass ("Move"). Animate (Origin_pos, "fast", function() { $( This). Removeclass ("Move"); }); }). On ("DragStart", function(e) {if(is_moving) {return false; } is_moving=true; e.originalevent.datatransfer.effectallowed = ' Move '; Origin= This; }). On ("DragOver", function(e) {if(E.preventdefault) E.preventdefault ();//Is_moving =false; E.originalevent.datatransfer.dropeffect= ' move ';// }); </script> </body>Daily sentence: I always knew looking back on the tears would make me laugh, but I never knew looking back on the laughs would make M E cry.
I know that when I look back, those tears want to laugh, but I do not know how to look back, those laughter can also call me to tears.
A drag-and-drop technique for sharing HTML5