UPDATE: Issue resolved, thanks for the help. It is working fine now: http://jsfiddle.net/c3AeN/1/ by Sudharsan
I have multiple links on my webpage, all in a similar format like this: note: When I say 'similar format', I mean that all links share the same class but have different IDs and text.
$(".do_it").click(function(){
// In this function, I extract the ID from the clicked link and redirect to the corresponding website
}
<a href="#" class="do_it" id="999">link1</a>
<a href="#" class="do_it" id="998">link2</a>
.
.
.
<a href="#" class="do_it" id="1">link999</a>
There are specific actions based on the ID, and the issue arises when one link is clicked, turning all links purple. Is there an easy solution to only apply the 'purple' style to the clicked link? //Apologies for any language errors