JQuery

Jquery is a language to access document elements easily. developers life gets easy when there is no need write document.getelementbyid ... again and again.

Check the following code ... where we assign a lambda function(are u c# developer?) to all respective TYPES



<img src="http://www.janaganamana.net/favicon.ico" />
<img src="http://www.janaganamana.net/favicon.ico" />
<img src="http://www.janaganamana.net/favicon.ico" />
<p>clean this text by clicking</p>
<p>clean this too..</p>
<p>me too!</p>

<script type="text/javascript">
$(document).ready(function () {
$("img").click(function () { $(this).hide(); });
$("p").click(function () { $(this).hide(); });
});
</script>
It is same if we use
$("img"). or
jquery("img").


$ nothing but a
function jquery(....)
{
}
and this function returns the target element(s)


In CSS also we assign styles to elements. Also programmatically. we have to find elements by their id or class or type etc...
Same is the case with Jquery.

we can find elements by id or class or type or classINclass or classINtype or etc...
$(selector).action() is way to select and act an element.

$(this).hide() - hides me.
$("p").hide() - hides all paragraphs.
$("p.test").hide() - hides all paragraphs with class="test".
$("#test").hide() - hides elements with id="test".(expect only one!!)