I would like to know how to make a link on a navigation menu stay selected when you have clicked on it? A good tutorial or example would be nice:)
A:
you can use in this link apycom.com. i'm a newbie too.and i have used this for my page.
klox
2010-08-12 06:39:36
+1
A:
Hello jackASS, I happen to have some computer codes that do exactly this.
a.selected {
background-color:#1F75CC;
color:white;
}
$("a").live('click', function() {
$("a").removeClass("selected");
$(this).addClass("selected");
return false;
});
Andy Gaskell
2010-08-12 06:39:59
A:
$('a[href="'+window.location.href+'"]').addClasss('currentPage');
This should do the trick. The condition is to have full path.
However, the right way is to generate correct code from the server side.
Ionut Staicu
2010-08-12 08:57:29