Advertisement
shekhar77

Add class to MENU ITEMS USING JS

Jun 21st, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. add_action('wp_head','menu_theme_fix_js');
  2.  
  3. function menu_theme_fix_js() { // break out of php ?>
  4. <script type="text/javascript">
  5. jQuery(document).ready(function($) {
  6. $("ul.sub-menu").addClass("dropdown-menu");
  7. });
  8. </script>
  9. <?php } // break back into php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement