Auto-Nav make Parent Link clickable
Permalink
Hello,
I have an upside-down problem it seems. I would like to make the parent links of my auto-nav menus with submenus clickable.
I have this here in:
I edited the line from href="#" to the above. That change gives the parent link the correct URL in the href, but the menu link does not react to the click (apart from opening the submenu).
The same directory contains this
Can any of you see the issue I might be having? Thank you in advance for looking at this. :-)
I have an upside-down problem it seems. I would like to make the parent links of my auto-nav menus with submenus clickable.
I have this here in
application/blocks/autonav/templates/responsive_main_navigation/view.php
[line 226 starts here] echo '<ul class="nav">'; //opens the top-level menu foreach ($navItems as $ni) { echo '<li class="' . $ni->classes . '">'; //opens a nav item if ($ni->isEnabled) { $ni->hasSubmenu; } else { echo '<span class="' . $ni->classes . '">' . $ni->name . '</span>'; } if ($ni->hasSubmenu) { echo '<a href="' . $ni->url . '" class="dropdown-toggle" data-toggle="dropdown">' . $ni->name . '<b class="caret"></b></a>'; } else { echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . $ni->name . '</a>'; } if ($ni->hasSubmenu) {
Viewing 15 lines of 22 lines. View entire code block.
I edited the line
echo '<a href="' . $ni->url . '" class="dropdown-toggle" data-toggle="dropdown">'
The same directory contains this
view.js
$(function() { $('.dropdown').hover( function () { $('.dropdown-menu', this).stop(true, true).fadeIn('fast') $(this).toggleClass('open') $('b', this).toggleClass('caret caret-up') }, function () { $('.dropdown-menu', this).stop(true, true).fadeOut('fast') $(this).toggleClass('open') $('b', this).toggleClass('caret caret-up') }, ) })
Can any of you see the issue I might be having? Thank you in advance for looking at this. :-)
If anyone else has this issue, add "disabled" into the data-toggle attribute. This will make the line look like so: