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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.