954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to Check the active link with jquery

Suppose I have a webpage which contains only the links(anchor) in it.... also suppose there are 5 anchor(links) on that page.........

My aim is to underline only that anchor that was clicked by the user.........or is being active now

Kindly tell me about it.... I have a rough idea of how to do it but didn't know the exact code for it...

My idea is to use jquery....and every time the page refreshes.....in the document.ready function there should be a check like this

if('.class-name a (any-anchor)') is clicked than

text-decoration:underline

kindly tell me the code if my idea was right or elsewhere telll me the right solution for it...plz

mmazeemahmad
Newbie Poster
15 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

You can do it by CSS. Please see following link:

http://www.echoecho.com/csslinks.htm

sufyan2011
Junior Poster
166 posts since Dec 2011
Reputation Points: 9
Solved Threads: 20
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: