Created
February 2, 2018 04:25
-
-
Save jbd91/fd81f22eb37628750daa6713a6575646 to your computer and use it in GitHub Desktop.
Off Canvas Duplicate Nav Item Foundation Fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Duplicates parent nav item link on off canvas menu and places it in the submenu so link can be clicked (fix for issue with foundation off canvas toggle) | |
| $('.off-canvas li.menu-item-has-children').each(function(){ | |
| link=($(this)[0].children[0].outerHTML); | |
| ul=$(this).find($('ul')); | |
| ul.children().children().first().parent().before('<li class="parentlink">'+link+'</li>'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment