Add “hover” class to table data (and change the background color of the class via CSS)


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $('table').delegate('td', 'hover', function(){
  2. $(this).toggleClass('hover');
  3. });

URL: http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.