I am learning events in jquery. While implementing them i came across a doubt. What is the difference between mousedown() and click() event. And which event should i use at what condition.?
For example: Both the events perform the same task in the below code:
$("#p1").mousedown(function(){
alert("Mouse down over p1!");
});
$("#p1").click(function(){
alert("Mouse down over p1!");
});
Both perform the same.Can someone clarify the difference. If same, which should i prefer?.