A very basic thing, I know. I have a collapsing div help box thing that is triggered when clicking links. Click the link, the help topic opens in th开发者_C百科e div.
I want the text in the link to stay bold until I click another link. What function am i looking for? I'm using jquery. Thanks!
Assuming all your help links have a class of "help", define a class:
a.last { font-weight: bold; }
and then:
$("a.help").click(function() {
$("a.last").removeClass("last");
$(this).addClass("last");
});
精彩评论