Streaming live at 10am (PST)

Dropdown open on load?


#1

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


Dropdown interactions
#2

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 ) :

<script>
  $(function () {
    $('.navlink .opened').removeClass("w-close").addClass("w--open");
    $('.navlink-list .opened').removeClass("w-close").addClass("w--open");
  });
</script>

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

Peace.


#3

I solved this issue using jQuery UI's accordion.

https://jqueryui.com/accordion/

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


#4

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