zamiast
$(this).addClass('click');
należy
$(this).toggleClass('click');
drugie starcie z jQuery

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> #mytable { border: 1px solid black; } #mytable th, #mytable td { border: 1px solid #000; padding: 3px; } #mytable tr.highlight { background-color: #b02329; } #mytable tr.click { background-color: yellow; } </style> <script type="text/javascript"> $(function() { $('#mytable tr').hover( function() { $(this).addClass('highlight'); }, function() { $(this).removeClass('highlight'); }) }); $(function() { $('#mytable tr').click( function() { $(this).addClass('click'); } ) } ); </script> </head> <body> <table id="mytable"> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> </table> </body> </html>