i have drag event over a div.image attached.
when i mouse down on div the drag event start.for this i include nestable.js plugin.i want to stop drag event of div during click on links of div .i am using js and html file from link: Nestable
Please give the solution,how can i do it.
To ignore handling on click, add "dd-nodrag" class to element.
author has a problem with nestable plugin. there is some better way to solve the problem of link click that is placed in the nestable container:
$(".dd a").on("mousedown", function(event) { // mousedown prevent nestable click
event.preventDefault();
return false;
});
$(".dd a").on("click", function(event) { // click event
event.preventDefault();
window.location = $(this).attr("href");
return false;
});
.dd - default nestable container class, change it if you need
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