Remove makeDraggable
Hi
I'am Referring to this topic:
general12/clear-delete-makedraggable-function-element-t2026.html
I have a function which makes an element (given as parameter) draggable.
But to prevent that one Element gets more than one Drag instance, I want to delete all the Drag instances before adding a new one.
How is it possible to delete the Drag instance from outside the function? In my case in another function.
My code:
I tried to explain myproblem as easy as possible because the drag script is part of an very difficult calendar.
Leonhard
I'am Referring to this topic:
general12/clear-delete-makedraggable-function-element-t2026.html
I have a function which makes an element (given as parameter) draggable.
But to prevent that one Element gets more than one Drag instance, I want to delete all the Drag instances before adding a new one.
How is it possible to delete the Drag instance from outside the function? In my case in another function.
My code:
- function remove(el)
- {
- //REMOVE DRAG INSTANCE
- }
- function make_draggable(el)
- {
- el.makeDraggable({..............a lot of options});
- }
- function run(el)
- {
- remove(el);
- //Here is an AJAX request executed
- make_draggable(el)
- }
I tried to explain myproblem as easy as possible because the drag script is part of an very difficult calendar.
Leonhard