Toggle and Hover - 2 very useful functions
Toggle and Hover
Toggle allows you to click an element and call alternating functions. The first time you click, it calls function 1, the second time it calls function 2. Then the third time it calls function 1 again. (you can do it with more than 2 functions, it will cycle thru them) http://api.jquery.com/toggle/
Hover alows you to easily bind a mouseover and mouseout function to an element. Just pass in 2 functions, the first will be called on mouseover the second on mouseout. http://api.jquery.com/hover/
Toggle
Toggle visibilty of the list below- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
Hover - simple
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida, ligula sed convallis luctus, urna justo dapibus turpis, et cursus sem libero eu ante. Proin sed condimentum justo.
Hover, more complex
Here I've put the LOREM IPSUM text into the tile of the anchor links. It will appear in the red box when you hover over an anchor link.