Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTML5 Drag and Drop Nodes

HTML5 Drag and Drop Nodes

A quick presentation about dragging and dropping DOM nodes between documents and listening for the correct "drop" event.

Shown at a Wurbe #47 lightning talk in Bucharest, November 2011. http://wurbe.ro/

Razvan Caliman

November 15, 2011
Tweet

More Decks by Razvan Caliman

Other Decks in Programming

Transcript

  1. Carrying the content as string el.addEventListener( "dragstart", function(e){ e.dataTransfer.effectAllowed =

    "move"; e.dataTransfer.setData( "text/html", e.target.outerHTML ) }, false)