jQuery Tutorial
First you need to download a copy of jQuery and insert it in your html page (preferably within the
tag). Then you need to write functions to tell jQuery what to do. The diagram below explains the detail of how jQuery works:
I. How to get the element?
Writing jQuery function is relatively easy. The key point you have to learn is how to get the exact element that you want to apply the effects.
* $("#header") = get the element with id="header"
* $("h3") = get all
element
* $("div#content .photo") = get all element with class="photo" nested in the
* $("ul li") = get all
element nested in all
* $("ul li:first") = get only the first
- element of the
II. Example - Slide Panel
Let’s start by doing a simple slide panel. You’ve probably seen a lot of this, where you click on a link and a panel slide up/down.
For more on jQuery, see the documentation: http://docs.jquery.com/Main_Page