You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
414 B
19 lines
414 B
function allowDrop(ev) {
|
|
ev.preventDefault();
|
|
}
|
|
|
|
function drag(ev) {
|
|
ev.dataTransfer.setData("text", ev.target.id);
|
|
}
|
|
|
|
function drop(ev) {
|
|
ev.preventDefault();
|
|
|
|
var data = ev.dataTransfer.getData("text");
|
|
var module = $('#'+data);
|
|
var parent = module.parent();
|
|
|
|
// parent.append($(module.get(0)));
|
|
// ev.target.appendChild(module.get(0));
|
|
console.log(module.text());
|
|
}
|