JQuery plugin to add a hover class to an element


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



Copy this code and paste it in your HTML
  1. $.fn.hoverClass = function(classname) {
  2. return this.hover(function() {
  3. $(this).addClass(classname);
  4. }, function() {
  5. $(this).removeClass(classname);
  6. });
  7. };
  8.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.