Dropdown open on load?

Is it possible to have a dropdown menu already open when the page loads so the site starts with open menus? Thank you.

1 Like

I managed to get an open dropdown menu on page load, but it still has one issue: it won’t close if other menu is clicked. :confused:

This is the code I added to Footer ( before < /body> tag ) :

  $(function () {
    $('.navlink .opened').removeClass("w-close").addClass("w--open");
    $('.navlink-list .opened').removeClass("w-close").addClass("w--open");

These classes were added to the elements inside the target dropdown:
navlink to Dropdown
navlink and opened to Dropdown Toggle
navlink-list and opened to Dropdown List

I may come back if I find a proper solution for this.

Any help is appreciated


1 Like

I solved this issue using jQuery UI’s accordion.


Is very simple to implement and there are a lot of sources on youtube.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.