Events
jQuery click event

click method is executed when user click on HTML element.

$("h2").click(function(){
$(this).hide();
});

jQuery double click event

double-clicks method is executed when user double-clicks on HTML element.

$("h2").dblclick(function(){
$(this).hide();
});

jQuery hover event

Hover method perform two function first when the mouse enter HTML Element, second when we leaves the mouse

$("h2").hover(function(){
$(this).hide();
});

jQuery focus event

focus method is generate when focus on some html element like we click on textbox then focus method will call

$("input").focus(function(){
$(this).css("background-color", "#F5F5F5");
});

Some other jQuery Events

mouseenter()
mouseleave()
mousedown()
mouseup()
blur()
on()


Previous
Next