jQuery plugin to change the row color on hover 6

For my project CivCRM, I wrote a simple jquery plugin to change the row color on mouse hover. It is generic enough and can be used in any project. Here is the implementation. 1. Create a plugin file:¬†jquery.crmrowhighlighter.js (function($){ $.fn.crmrowhighlighter = function(){ if ($(‘.crm-row-highlighter-processed’).length == 0){ $(‘.selector tr’).hover(function(){ $(this).addClass(‘crm-row-highlight’); },function(){ $(this).removeClass(‘crm-row-highlight’); }); $(‘.selector’).addClass(‘crm-row-highlighter-processed’); }; }; ...