Reputation: 533
Hi can someone help me how exactly a bind understands an event passed for example,
$("#example_button").bind("click",function(){
alert("Event is clicked");
})
$("#example_button").bind("mouseover",function(){
alert("Event is mouseover");
})
How exactly bind figures(identifies) the event.... i mean is there any way to identify a event...
Upvotes: 2
Views: 99
Reputation: 19037
See the type
attribute on the jQuery event object:
$("a").click(function(event) {
alert(event.type); // "click"
});
Upvotes: 3