allowParentLinks: creates a double-link for parent links
See original GitHub issueI am not sure why this happens, but my (clickable) parent links are parsed as an a-element inside an a-element. The sub-links (without further child-links) are parsed correctly with just one a-element. . The final code (with active JS) looks like this:
<ul id="menu" class="slicknav_nav" style="display: block;" aria-hidden="false" role="menu">
<li class="submenu hnav-wichtig sibling first slicknav_collapsed slicknav_parent">
<a class="slicknav_item" tabindex="0" aria-haspopup="true" role="menuitem" href="#" style="outline: medium none;">
<a class="submenu sibling first" href="foo.html">Foo</a>
<span class="slicknav_arrow">►</span>
</a>
<ul class="level_2 slicknav_hidden" role="menu" style="display: none;" aria-hidden="true">
...
I’ve got this setup:
$(function(){
$('#menu').slicknav({
label: 'Navigation',
duplicate: false,
duration: 1000,
easingOpen: "swing",
closeOnClick: false,
allowParentLinks: true,
prependTo: '#mobile-anchor'
});
});
</script>```
Issue Analytics
- State:
- Created 9 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Links not working on mobile menu when using Slicknav
On the desktop, my default menu on hovering to parent-link1 opens a dropdown, and if I click on parent-link1, a redirect occurs. But...
Read more >Mobile menu parent links not clickable
The parent link itself, if it links to a page, is not clickable. If you need the parent link to be clickable, there's...
Read more >How to make the parent link item clickable in Twitter Bootstrap
This makes the parent link item clickable to the destination URL that you set within the WordPress menu if that's what you're using...
Read more >Parent and child pages: Linking hierarchical post types for SEO
Link your hierarchical posts for users and SEO. As all this content with one parent page is related, it makes sense to connect...
Read more >How to disable parent menu link in WordPress (A ... - YouTube
This video shows you how to disable the link to a parent page in a WordPress menu.https://youtu.be/eClL25L52dQSubscribe for more videos.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I took some time and attempted to implement what you suggested. If you now set the “nestedParentLinks” option to false while “allowParentLinks” is true, it puts the drop down link only on the arrow. This is my initial attempt, so there may be some bugs, but please feel free to give it a shot and give me any feedback. I also had to change the default CSS, so make sure you grab that update as well.
love you slicknav, been using it on some wp sites for years. many of my customers -> customers complain about the fact they can’t find submenus/pages, even though we’re using a quite large “+” button as slicknav arrow.
i agree: the best solution would be 1st click on parent link -> submenu open. 2nd click on parent link -> go to page.
just deactivating links on parents is no solution, as the links become not visitable anymore.
www.windpower-gmbh.de - reduce bowser window width. any idea how to achive this?