• Resolved joondawg

    (@joondawg)


    My website isn’t live yet but I’m running into issues with the drop-down menus.

    When I hover over the menu, sub menus expand as intended so I know the drop-down function works. However, the sub menu does not contract (go away) until I click somewhere else on the page. Is there a way to make the sub menus disappear when I move my cursor away?

    Also, clicking on the parent menu only opens and closes the sub menus. I’d like to be able to click on the parent menu and go to the page itself, separate from the sub menu pages.

    Any help is appreciated, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Follow this thread.

    Open menu.js file into any text editor.

    Find below line

    // Your other code to run on DOM ready…

    and put this line of code

    jQuery(“.nav .dropdown-toggle”).click(function () {
    window.location = jQuery(this).attr(‘href’);
    });

    below the line.

    Save all the changes.

    Thanks

    Thread Starter joondawg

    (@joondawg)

    Thank you for the reply. However, I’m not able to find the menu.js file. I clicked on wp-content -> themes -> Enigma -> js but could not find menu.js. Here’s an image of what I see in the js folder.
    https://postimg.org/image/jmctm0f2z
    Could the menu.js file be located somewhere else?

    EDIT: Never mind, I found it in a different “Enigma” theme folder.

    Thread Starter joondawg

    (@joondawg)

    I followed your directions and read the threads. Everything I asked about works perfectly. Thank you very much!

    Hi weblizar_support

    I am about to do the same thing as described above. I have found the menu.js file and pasted the code into it.

    Now I have this question.
    Shall I just overwrite the menu.js file in the parent theme or should I put the menu.js file into a child theme.

    Thanks in beforehand

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Menu Link and Hover’ is closed to new replies.