Last active
January 15, 2017 20:40
-
-
Save patric-boehner/251c85fe37dbad9dd53204da4723cbc0 to your computer and use it in GitHub Desktop.
Update to Genesis responsive menu script to change the JS body class to NOJS
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
| <?php | |
| //* Do NOT include the opening php tag shown above. Copy the code shown below. | |
| // Add sitewide body class no-js to more easily style for when js is disabeled. | |
| /* This is purly prefrance. By default the responsive-menu.js script normaly adds | |
| * a js body class when js is present but has no body class for when js is disabled, | |
| * which can be problamatic when you prefer to sytle based on the lack of JS | |
| */ | |
| add_filter( 'body_class', 'pb_js_detect_body_class' ); | |
| function pb_js_detect_body_class( $classes ) { | |
| $classes[] = 'no-js'; | |
| return $classes; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment