Using jQuery, I often like to use mousedown
and mouseup
events in conjunction for pushable buttons.
However, in every case I've used the mouseup
event, binding the click
event instead seemed to produce identical results.
Is there any substantial difference between the two methods below?
// Method 1
$('.myButton').bind('click', callback);
// Method 2
$('.myButton').bind('mouseup', callback);
Please note I'm seeking a technical explanation on the differences between using both methods. This has no relation to the question that has been flagged as a dupe: Differentiate click vs mousedown/mouseup
See Question&Answers more detail:os