JQuery is a free javascript library that ease the usage of javascript technology in the development of the website, with JQuery you
write less and get more ! JQuery is free and you can download its latest version from :
http://jquery.com/It is just one file you can include it as following :
- Code:
<head>
<script src="jquery-1.8.2.min.js"></script>
</head>
JQuery is the most famous Javascript library and it is used by many big companies such as GOOGLE and IBM. Instead of downloading the JQuery package you can just link to the one used in GOOGLE as following :
- Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
</script>
There are some advantages of linking to JQuery on Google like :
1- Faster Loading time ( As the JQuery file may be cached at your browser because others website you may already visited using it )
2. Second getting the latest version automatically.
The syntax of JQuery is as follows :
- Code:
$(selector).dosomething()
for example :
- Code:
$("p").hide() // Hide all paragraphs
or
- Code:
$(".divA").hide() // Hide all html elements with class .divA
So in brief, with JQuery you will be selecting html elements from the current document and doing some actions on it, important hint before you start that you should wait until the document is loaded before you start JQuery actions and this is handled by calling ready function :
- Code:
$(document).ready(function(){
});
For examples about JQuery please visit section below :
jquery-examples/