Time for action – animations with show/hide

It's always easiest to add any required HTML and basic CSS first, before adding any behavior with JavaScript, and this example is no exception.

  1. Add the following markup to the <body> of the template file:
    <nav> <ul> <li><a href="#" title="Top Level Link">Top Level</a></li> <li><a href="#" title="Top Level Link">Top Level &raquo;</a> <ul> <li><a href="#" title="2nd Level Link">2nd Level Link</a></li> <li><a href="#" title="2nd Level Link">2nd Level Link</a></li> <li><a href="#" title="2nd Level Link">2nd Level Link</a></li> </ul> </li> <li><a href="#" title="Top Level Link">Top Level</a></li> <li class="last"><a href="#" title="Top Level Link">Top Level &raquo;</a> <ul> <li><a href="#" title="2nd Level ...

Get jQuery 1.4 Animation Techniques Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.