views:

31

answers:

1

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 the 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!

+2  A: 

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");
});
cletus
Worked great-thanks!
Joel