Last active
December 12, 2015 09:39
-
-
Save MoOx/4753179 to your computer and use it in GitHub Desktop.
Please show me how will you write that without jQuery please :)
(It's not I'm not able to do it, but you already know that right ?)
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
// togglable ability (used for navbar) | |
$('.js-togglable').each(function() { | |
var togglableContainer = this; | |
$('.js-togglable__toggler', togglableContainer).on('click keyup', function() { | |
$('.js-togglable__item', togglableContainer).toggleClass('js-togglable__item--hide'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found an other way for the
forEach
trick.