Created
March 28, 2013 21:01
-
-
Save jlittlejohn/5266757 to your computer and use it in GitHub Desktop.
JS: Add Class on Hover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Class on Hover | |
$('#target').bind('mouseenter mouseleave', function(e){ | |
$(this).toggleClass('active', e.type === 'mouseenter'); | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment