Last active
March 6, 2017 16:25
-
-
Save extra0/83f4e1107480ac3a9929dc98eb8b5c4c to your computer and use it in GitHub Desktop.
Active toggle
This file contains 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
// toggle class active | |
$('[data-toggle]').on('click', function(){ | |
$(this).toggleClass('active'); | |
$(''+ $(this).attr('data-toggle')+'').toggleClass('active'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment