Smart Navigation with jQuery

In my first tutorial, learn how to create a menu that knows where you are by dynamically adding classes to your navigation.

Demo

One Response to “Smart Navigation with jQuery”

  1. James Says:

    Nice tut Chris. :)

    The jQuery part could be shortened though:

    $(function(){
    $(’#nav a’).click(function(){
    $(this).parent().addClass(’selected’).siblings(’li’).removeClass(’selected’);
    });
    });

Leave a Reply