jQuery :path Demo

Just a simple example of how :path works with active states on menu items.

Code:


$('ul a:path').parent().addClass('active');
$('ul a:current').each(function() {
	$(this).replaceWith($(this).text());
});	

Primary navigation

Secondary navigation

Click these to see how it works on query strings as well.

« back to :path