1) click() : The function is executed when the user clicks on the HTML element.
$("p").click(function(){
$(this).hide();
});
$("#p1").mouseup(function(){
alert("Mouse up over p1!");
$("#p1").hover(function(){
alert("You entered p1!");
},
function(){
alert("Bye! You now leave p1!");
$(this).css("background-color","#cccccc");
$(this).css("background-color","#ffffff");
$("p").click(function(){
$(this).hide();
});
2)dblclick() : The function is executed when the user double-clicks on the HTML element.
$("p").dblclick(function(){
$(this).hide();
});
$(this).hide();
});
3)mouseenter() : The function is executed when the mouse pointer enters the HTML element.
$("#p1").mouseenter(function(){
alert("You entered p1!");
});
alert("You entered p1!");
});
4)mouseleave() : The function is executed when the mouse pointer leaves the HTML element
$("#p1").mouseleave(function(){
alert("Bye! You now leave p1!");
});
alert("Bye! You now leave p1!");
});
5)mousedown() : The function is executed, when the left mouse button is pressed down, while the mouse is over the HTML element
$("#p1").mousedown(function(){
alert("Mouse down over p1!");
});
alert("Mouse down over p1!");
});
6)mouseup() : The function is executed, when the left mouse button is released, while the mouse is over the HTML element
alert("Mouse up over p1!");
});
7) hover() : The first function is executed when the mouse enters the HTML element, and the second function is executed when the mouse leaves the HTML element
alert("You entered p1!");
},
function(){
alert("Bye! You now leave p1!");
});
8) focus() : The function is executed when the form field gets focus
$("input").focus(function(){$(this).css("background-color","#cccccc");
});
$('#tblCadastro input').focus();
9)blur() : The function is executed when the form field loses focus
$("input").blur(function(){$(this).css("background-color","#ffffff");
});
No comments:
Post a Comment