Created
June 30, 2017 10:34
-
-
Save Farmatique/98390c7786af019d3f10fe7ad5404e96 to your computer and use it in GitHub Desktop.
add/remove "expanded" class for mobile header by clicking on toogle-button (collapse/expand)
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 in header on expanding mobile menu */ | |
| jQuery('#bs-example-navbar-collapse-1').on('show.bs.collapse', function () { | |
| jQuery('header').addClass('expanded'); | |
| }) | |
| jQuery('#bs-example-navbar-collapse-1').on('hide.bs.collapse', function () { | |
| jQuery('header').removeClass('expanded'); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment