blob: 71869492fdbf5db1220c56894685f210988d1c93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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]);
}
}
};
};
}());
|