diff options
Diffstat (limited to 'static/js/kbjr-DragDrop-906d7ff/jquery.dragdrop.js')
| -rw-r--r-- | static/js/kbjr-DragDrop-906d7ff/jquery.dragdrop.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/static/js/kbjr-DragDrop-906d7ff/jquery.dragdrop.js b/static/js/kbjr-DragDrop-906d7ff/jquery.dragdrop.js new file mode 100644 index 0000000..7186949 --- /dev/null +++ b/static/js/kbjr-DragDrop-906d7ff/jquery.dragdrop.js @@ -0,0 +1,24 @@ +(function() { + + $.fn.dragdrop = function(opts) { + opts = opts || { }; + + var bindings = [ ]; + this.each(function() { + var options = $.extend({ }, opts); + if (typeof options.anchor === 'string') { + options.anchor = $(options.anchor, this)[0]; + } + bindings.push(DragDrop.bind(this, options)); + }); + + return { + unbind: function() { + for (var i = 0, c = bindings.length; i < c; i++) { + DragDrop.unbind(bindings[i]); + } + } + }; + }; + +}()); |
