Created
December 19, 2014 20:28
-
-
Save atwellpub/e797861b30286c12b44b to your computer and use it in GitHub Desktop.
Reveals hidden submenus on page load for twentyfifteen theme.
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
/** | |
* Toggles the menu dropdowns to open state | |
*/ | |
function mod_toggle_menus() { | |
?> | |
<script type='text/javascript'> | |
jQuery(document).ready( function() { | |
/* add toggled-on class to submenus */ | |
jQuery('.sub-menu').addClass('toggled-on'); | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer' , 'mod_toggle_menus'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! :D