Adding/Removing Class on Hover


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



Copy this code and paste it in your HTML
  1. $('#elm').hover(
  2. function(){ $(this).addClass('hover') },
  3. function(){ $(this).removeClass('hover') }
  4. )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.