Im trying to highlight the parent row of the link on click, that part is working fine, what i need to do is to deselect the highlighted row once another link of a new row is clicked, if you have any suggestions please let me know, thank you in advance, here is the code im using:
<script type="text/javascript"> $(document).ready(function() { $("a").click(function() { $(this).parents("tr").addClass("highlight"); }, function() { $(this).parents("tr").removeClass("highlight"); }); }) </script> <table> <tr> <td><a href="#">Goog</a></td> <td>Google</td> <td>505.08</td> <td>BUY</td> </tr> <tr> <td><a href="#">YHOO</a></td> <td>Yahoo</td> <td>32.10</td> <td>SELL</td> </tr> <tr> <td><a href="#">VLO</a></td> <td>Valero</td> <td>60.95</td> <td>BUY</td> </tr> </table>
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/