Created
May 21, 2017 12:30
-
-
Save extra0/caf75c6897db722fceac175e1621b433 to your computer and use it in GitHub Desktop.
Data-Toggle
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
// toggle class with block | |
$('[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