themefisher / meghna-hugo

Meghna Hugo is a responsive, minimalist, lightweight, and fast loading one-page business theme built with HTML5/CSS3, Hugo, JavaScript, and JQuery.
https://gethugothemes.com/products/meghna/?utm_source=meghna_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
441 stars 1.23k forks source link

Drop Down Menu Not Working #182

Closed dradux closed 2 years ago

dradux commented 2 years ago

I am running the latest version of the theme (released 2021-09-01) on hugo Hugo Static Site Generator v0.76.5-60F0725B/extended linux/amd64 BuildDate: 2020-10-14T15:25:14Z.

The drop down menu is not working. I get a menu item (tools) with the drop down arrow showing but nothing shows in the menu when you click or hover. 2022-01-01_1312 19_1040x740_scrot

If I look at the source code of the page in the debugger I can see the menu parent and child are present:

<li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        tools
    </a>
     <div class="dropdown-menu">
        <a class="dropdown-item" href="/contact">trax</a>
     </div>
</li>

My menu in config.toml is defined as follows:

[[Languages.en.menu.main]]
name = "tools"
hasChildren = true
weight = 10
    [[Languages.en.menu.main]]
    parent = "tools"
    name = "trax"
    url = "contact"
tfsomrat commented 2 years ago

Hello @dradux

I checked this theme in my localhost, and it works fine. So I added a demo dropdown and made an update. you can check the latest code running into your localhost. Also if it doesn't work, try to clear your browser cache, or open an incognito tab. thanks

dradux commented 2 years ago

thanks @tfsomrat , turns out my issue was I had disabled bootstap.min.js as I didn't need it before and I forgot to recheck after adding the dropdown in. I really appreciate the quick reply and your adding the dropdown to the exampleSite.

For those who may later find this, I disabled the following in config.toml which kept the dropdown from working:

#[[params.plugins.js]]
#link = "plugins/bootstrap/bootstrap.min.js"