Jquery Events
attach a function to document after it is ready
$(selector).click(function)
attach a function to selected item after it is clicked
$(selector).dblclick(function)
attach a function to selected item after it is double clicked
$(selector).focus(function)
attach a function to selected item after it gets focus
$(selector).mouseover(function)
attach a function to selected item after it is hovered
var flipper = true;
$(document).ready(function(){
$("button").click(function(){
if(flipper)
{
$("p").hide(300);
flipper = false;
$(this).Value= 'show';
}
else
{ $("p").show(300);
flipper = true;
}
});
});
</script>
<button>Hide</button>
<p>slowly hide me by clicking button.</p>
<p><b>$("div#details .head") Selects all elements with class="head" inside a div element with id="details"</b></p>