Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Assign even and odd classes to nav bar menu items
- add_action('wp_enqueue_scripts', 'add_my_code');
- function add_my_code() {
- add_action( 'print_footer_scripts', 'my_footer_script' );
- }
- function my_footer_script() { ?>
- <script type="text/javascript">
- jQuery(document).ready(function($) {
- $("#menu-standaard > li:nth-child(odd)").addClass("odd");
- $("#menu-standaard > li:nth-child(even)").addClass("even");
- });
- </script>
- <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement