30 lines
739 B
JavaScript
Vendored
30 lines
739 B
JavaScript
Vendored
"use strict";
|
|
|
|
var KTCardDraggable = function() {
|
|
|
|
return {
|
|
//main function to initiate the module
|
|
init: function() {
|
|
var containers = document.querySelectorAll('.draggable-zone');
|
|
|
|
if (containers.length === 0) {
|
|
return false;
|
|
}
|
|
|
|
var swappable = new Sortable.default(containers, {
|
|
draggable: '.draggable',
|
|
handle: '.draggable .draggable-handle',
|
|
mirror: {
|
|
//appendTo: selector,
|
|
appendTo: 'body',
|
|
constrainDimensions: true
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}();
|
|
|
|
jQuery(document).ready(function() {
|
|
KTCardDraggable.init();
|
|
});
|