Return to Snippet

Revision: 14435
at June 3, 2009 22:49 by kstetson


Initial Code
// Add to global.js:

// Add class of last to the last li tag (in the top navigation)
$('#header li:last').addClass('last');
// Add class of first to the first li tag (in the top navigation)
$('#header li:first').addClass('first');


// Add to CSS:

#header li.first 
{
	display: none;
}

#header li.last 
{
	background: none;
	padding-right: 0;
}

Initial URL


Initial Description
Use javascript to add a class of last onto the first and the last li tags in the navigation (add to global.js). Then use css to style. For instance, if the first li is home, you can set the css to hide this link (if you want the logo to act as your home link instead). You may have a background pattern that you want to turn off on your last li tag, you can set the css background to none in this case.

Initial Title
In wordpress navigation, target the first & last li tags & style

Initial Tags
css, wordpress, style, navigation, jquery

Initial Language
jQuery