Skip to content

Instantly share code, notes, and snippets.

View alignsoft's full-sized avatar

Stephen R. Smith alignsoft

View GitHub Profile
@alignsoft
alignsoft / draggable.js
Last active July 10, 2016 20:44 — forked from siongui/draggable.js
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) {