JavaScript
Article

HTML5 Drag and Drop Image Demo

By Sam Deering

Just a quick HTML5 Drag and Drop demo I made in jsfiddle. https://jsfiddle.net/KxfpG/7/. If you didn’t know one of the cool features in HTML5 is the ability to Data Transfer from one object to another. There are more flashy things you can do but this demo just uses setData() and getData(). To try out the demo simply drag image 1 onto image 2.

  • Luiz Roberto Meier

    Can you provide an useful example? Example: four squares where you can pick a king and move the king image around the four squares as in a chessboard? Thx.

    • http://jquery4u.com/ jQuery4u

      Hi Luiz, yes more demos coming soon!
      Sam

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.