ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

Problems with links in dropdown. #81

Closed l3ackdraft closed 9 years ago

l3ackdraft commented 9 years ago

I like this script and am using in with wordpress and bootstrap 3 design. When a link has children and grandchildren, the link does not work except the last child.

For instance: Link -- -- Child -- Grandchild

Only grandchild takes me to the page when I have items on both link and child.

http://demo.maltesesolutions.com

Javascript: if (jQuery().slicknav) { jQuery('.main-menu').slicknav({ label: '', parentTag: 'a', allowParentLinks: true, prependTo:'#mobile-menu' }); }

CSS overrides

.slicknav_menu{ display:none; } .slicknav_menu{ background:#eee; } .slicknav_btn{ background:#eee; float:left; } .slicknav_menu li a:hover, .slicknav_nav a:hover, .slicknav_item:hover{ background:#eee !important; color:#000; }

mobile-menu{

display:hidden; } @media screen and (max-width:480px){ .slicknav_menu{ display:block; } }

Any thoughts would be appreciated.

ComputerWolf commented 9 years ago

@l3ackdraft, it looks like you wrote allowParentLinks: true in your comment but never set it in the code. Can you please make sure that option is set and see if it works?

l3ackdraft commented 9 years ago

That fixed it. I figured I had to be missing something somewhere and I never unminified the js