Created
January 27, 2020 05:16
-
-
Save rizqinizamil/c0ee39f10e2ebe7c9cee01e84108c20b to your computer and use it in GitHub Desktop.
[jQuery] Add/remove 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
// Source: https://css-tricks.com/snippets/jquery/addingremoving-class-on-hover/ | |
$('#elm').hover( | |
function(){ $(this).addClass('hover') }, | |
function(){ $(this).removeClass('hover') } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment