If i have 5 links.When first if i click a link it has to change to some other color and next if i click other link previous link color should go to default and this link color has to change
CODE:
$("table#menu tr > td a[href^='#']").click(function() {
$(this).toggleClass('class1'); /
});
a.class1 { color:#000000; }
<table id="menu">
<tr>
<td><a href="#" id="link1">qwerty</a></td>
</tr> <tr>
<td><a href="#" id="link1">zyz</a></td>
</tr>
</table>
This should answer your question:
http://jsfiddle.net/TL9rh/
html
javascript
css