Skip to content

Instantly share code, notes, and snippets.

@adebigare
adebigare / _drag.md
Last active August 29, 2015 14:25 — forked from aresnick/_drag.md

A small example of how you can implement click-to-drag in JavaScript

This is a small example implementing click-to-drag with a bit of JavaScript…Please let us know if you have any questions!

Further doing

  • Watch the short screencast associated with this sketch here
  • Check out another gist of ours on mouse events here
  • Modify the code so that:
  • …if you double-click the square, it disappears