Skip to content

Instantly share code, notes, and snippets.

View MrSwitch's full-sized avatar
💭
I may be slow to respond.

Andrew Dodson MrSwitch

💭
I may be slow to respond.
View GitHub Profile
@siongui
siongui / draggable.js
Created February 17, 2013 00:40
AngularJS draggable element (position must be absolute)
/**
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js
* @see http://docs.angularjs.org/guide/compiler
*/
angular.module('draggableModule', []).
directive('draggable', ['$document' , function($document) {
return {
restrict: 'A',
link: function(scope, elm, attrs) {