I found this jQuery code on a forum: http://jsfiddle.net/nZLpk/8/
However, if I change the code to this http://jsfiddle.net/c5LTj/ (modifying $(this).css({'font-weight': 'bold', 'border-left': '5px solid #555554'}); the border will stay on the link even if that is not the selected one… Please help. Thanks!
I found this jQuery code on a forum: http://jsfiddle.net/nZLpk/8/ However, if I change the
Share
You have to reset
border-lefton all elements with classatagthe same way you are resetting theirfont-weight:http://jsfiddle.net/c5LTj/1/
If you just want to change the color, as you said the comment below:
You could also improve your code a lot if you remove
showonlyoneand the inlinehref="javascript:showonlyoneinstances, and do the work ofshowonlyonein the same place where you’re changing the appearance of the links.