On 9 May 2009, at 21:31, Charlie Griefer wrote:
On Sat, May 9, 2009 at 4:41 AM, naz <nazimjamil@gmail.com> wrote:Hello all, probably a simple question but I can't for the life of mefigure out how to do this:I have a page that has information on various # anchors, a list ofthem are at the top and once clicked I need the one clicked to becomeunderlined and remain underlined untiled a different # is clicked.How on earth do I do this? I've managed to use jquery toggle to turnon an underline once it is clicked, but i have to click the same linkagain to turn it off, which is not what I want, I need it toautomatically turn off once a different link is clicked!
assume they all have a class of "myAnchor"
$('.myAnchor').click(function() {
$('.myAnchor').css('text-decoration', 'none');
$(this).css('text-decoration','underline');
});
--
I have failed as much as I have succeeded. But I love my life. I love
my wife. And I wish you my kind of success.
No comments:
Post a Comment