To start with jquery is a simpler task. To use jquery is a fun. Here is a starter.
$ refers to jquery
$(this).hide()
Demonstrates the jQuery hide() method, hiding the current HTML element.
$(“#test”).hide()
Demonstrates the jQuery hide() method, hiding the element with id=”test”.
$(“p”).hide()
Demonstrates the jQuery hide() method, hiding all <p> elements.
$(“.test”).hide()
Demonstrates the jQuery hide() method, hiding all elements with.
<html>
<head>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").click(function(){
$(this).hide();
});
});
$(document).ready(function(){
$("#idtest").click(function(){
$(this).hide();
});
});
$(document).ready(function(){
$(".classtest").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
<div id="idtest">hide this div with id idtest</div>
<span>hide this span with classtest idtest</span>
</body>
</html>