I have designed a grid of 5x5 boxes. My goal is to be able to click on a link and have that specific link change color after it has been clicked (a:visited) - one at a time. Unfortunately, my current code changes the color of all the links instead of just the one that was clicked on.
Here is the HTML code:
<ul id="rowOne" class="center">
<li><a href="#">$100</a></li>
<li><a href="#">$100</a></li>
<li><a href="#">$100</a></li>
<li><a href="#">$100</a></li>
<li><a href="#">$100</a></li>
</ul>
This is the Jquery code I am using:
$('a').click(function(){
$.each('a').css({'color':'#002290'});
});
Does anyone have any suggestions or solutions?