Friday, March 19, 2010

jQuery lesson 1

Q. What is jQuery?
A. jQuery is JavaScript readymade Library.

Q. What is readymade library?
A. It’s a collection of functions developed by talented web developers to be used by other people freely and easily too.

Q. How to use the jQuery library?
A. Simply go to the following link: http://www.jquery.com and download the .js file to be used in your website.

Q. From where do I get this .js file?
A. you can download it from the following link: http://code.jquery.com/jquery-1.4.2.min.js

Q. How to be able to use it in my website?
A. Simply save this .js file in the website folder and then in the tag write the following line: <script type="text/javascript" language="javascript" src ="jquery-1.4.2.min.js">< /script>

Q. How to be able to use the functions now?
A. There is more than one way:
1- Create a new .js file and write your own new jQuery code in it after importing it to your < head> tag like we did above in the jQuery.js file.
2- Write your code inside the tag using a normal javascript functioins <script type="text/javascript"> your code in between this tag