0

I'm trying to figure out an issue on a WordPress site with sub-menus not appearing after an upgrade to WP 3.9.1. The site -- accessible here -- is using the Zeus theme (v. 1.1.0) and it appears that the sub-menu behavior is handled by "jqueryslidemenu.js".

Upon upgrading WordPress, the loaded version of jQuery changed to 1.11.0 and it appears that this theme was developed with an older jQuery version, so I'm wondering if that might be at the root of the issue. Interestingly, with the help of Firebug, I can see that the sub-menus are being created within <ul class="submenu"> -- say by hovering over "About" in the main navigation menu -- although they are just not visible. Thus I'm hoping there is an easy solution via a JS/CSS edit.

halfer
  • 19,824
  • 17
  • 99
  • 186
nickpish
  • 839
  • 4
  • 24
  • 43
  • 1
    You have a JS error on your homepage where there's

    tags in your Google Analytics code. You might also try replacing the $ in the document ready function in jqueryslidemenu.js with jQuery as outlined in this answer: http://stackoverflow.com/questions/7975093/typeerror-undefined-is-not-a-function-evaluating-document

    – ReLeaf May 20 '14 at 02:06
  • Thanks so much ReLeaf-- that worked!!! I used the following syntax, although I'm assuming there's some redundancy in my implementation? `jQuery(function($){ jQuery("#nav>div.menu>ul").unwrap(); });` I'm also curious to know why dropping the document ready function in this way makes the script initialize properly? Thanks again... – nickpish May 20 '14 at 02:45
  • 1
    More info on jQuery noConflict mode here: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers If you want, you could deregister the default version of jQuery and register/enqueue your own version. http://codex.wordpress.org/Function_Reference/wp_deregister_script http://codex.wordpress.org/Function_Reference/wp_register_script http://codex.wordpress.org/Function_Reference/wp_enqueue_script – ReLeaf May 20 '14 at 10:21
  • This is all extremely helpful; thanks very much ReLeaf. Btw if you wish to re-post your response as an answer, I'll mark it as accepted. – nickpish May 20 '14 at 20:54

1 Answers1

1

You have a JS error on your homepage where there's paragraph tags in your Google Analytics code. You might also try replacing the $ in the document ready function in jqueryslidemenu.js with jQuery as outlined in this answer: TypeError: 'undefined' is not a function (evaluating '$(document)')

More info on jQuery noConflict mode here: codex.wordpress.org/Function_Reference/… If you want, you could deregister the default version of jQuery and register/enqueue your own version. http://codex.wordpress.org/Function_Reference/wp_deregister_script http://codex.wordpress.org/Function_Reference/wp_register_script http://codex.wordpress.org/Function_Reference/wp_enqueue_script

Community
  • 1
  • 1
ReLeaf
  • 1,368
  • 1
  • 10
  • 17