Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allowParentLinks: creates a double-link for parent links

See original GitHub issue

I 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>
<ul class="level_2 slicknav_hidden" role="menu" style="display: none;" aria-hidden="true">

I’ve got this setup:

      label: 'Navigation',
      duplicate: false,
      duration: 1000,
      easingOpen: "swing",
      closeOnClick: false,
      allowParentLinks: true,
      prependTo: '#mobile-anchor'

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

ComputerWolfcommented, Jun 12, 2014

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.

ff-webdesignercommented, Nov 26, 2015

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. - reduce bowser window width. any idea how to achive this?

Read more comments on GitHub >

github_iconTop 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. for more videos.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found