Topic: Dropdown on Hover AND Click Needed

tmvntr free asked 2 years ago


Got the megamenu Dropdown on hover feature to work, but need the menu item clickable, too. Can make it clickable, but when the user gets to the destination page, the dropdown is displayed. Can probably do everything needed with JS, but I was wondering if there is already a setting available that does what I want before I invest the time tinkering with JS.


Dawid Wajszczuk staff commented 2 years ago

Hi. Can you provide a snippet showing what you have so far https://mdbootstrap.com/snippets/? What is the issue you're trying to solve, the dropdown being displayed after going to the destination page?


tmvntr free commented 2 years ago

Need the menu to display on hover AND for each parent menu to be clickable so that the user can instead go directly to a page and simply scroll to view the items that are menu'd on the corresponding dropdown menu. The main menu at https://www.ohio.edu is similar to what we need (except for the large bar that appears below each menu). Thank you very much for your help BTW.


Dawid Wajszczuk staff commented 2 years ago

There is no setting for this kind of behavior. You need to do this with JS. I suggest removing data-mdb-toggle and data-mdb-target attributes from buttons/links on your navbar and maybe triggering show method on hover https://mdbootstrap.com/docs/standard/components/collapse/#docsTabsAPI.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No