In Jquery UI I can configure an element as draggable by invoking
$("#drag").draggable();
But is there a way to start and stop the drag functions manually from another function? Ie
someOtherFunction = function() {
$("#drag").startdrag();
}
yetAnotherFunction = function() {
$("#drag").stopdrag();
}
Answers above seem overcomplicated.
$('.nonDraggableObjectWhichTriggersDrag').mousedown(function(e) {
$('.draggableObject').trigger(e);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With