JQuery code $(element).on("click", selector, handler) , the handler function is called after releasing the mouse button from the selected element. Is there a way to trigger an event on mouse click?
$(element).on("click", selector, handler)
You can use a function .mousedown() to achieve your desired result:
.mousedown()
$( "#target" ).mousedown(function(){});
Or you can use a function .on() and pass "mousedown" as an action:
.on()
$( "#target" ).on('mousedown', function(){});
you can use .mousedown()
$(document).off("mousedown","#ID").on("mousedown","#ID", function(){ ... });