You'll need to add a click listener to each link, then when the user
clicks, add the class 'current'. When the user clicks another link you
can remove the "current" class from all links inside the div before
assigning the 'current' class back to the clicked link. You can do
something like this.

$(document).ready(function(){
  $('#right a').click(function(){
    $('#right a').removeClass("current"); //remove the current class
from any link inside the div
    $(this).addClass("current"); //add the current class to the link
that was clicked.
  });
});

Brian

On May 14, 3:24 pm, wattaka <[EMAIL PROTECTED]> wrote:
> I am trying to assign a tags in a DIV a class when they are clicked
> and and visited and remove the class when another tag in the DIV is
> clicked, I tried this t activate the tag:
>
> $('#right a').focus(function(){
>                         $(this).addClass('current')
>
>                         });
>
> This assigns all the a tags in the "right" div the clas 'current' but
> only when clicked on, can anyone give me a clue?
>
> Thanks

Reply via email to