Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Add megamenu functionality? #17

Open
ChrisVWL opened this issue Apr 26, 2012 · 2 comments
Open

Add megamenu functionality? #17

ChrisVWL opened this issue Apr 26, 2012 · 2 comments

Comments

@ChrisVWL
Copy link

Hi Matt, This is brilliant - thanks. I've been doing my head in trying to implement a megamenu with this and hoped you might point me in the right direction: I tried adding this

function stripDivs($this){
if(isMobile()) {
var myLis = [];
myLis = $('div.megacolumn-content').find('li');
$('ul.megamenu').remove();
$(myLis).wrap('

    ').insertAfter('li.here');
    }
    }

    after function isMobile is defined but no luck yet. The li with the class here is just the first list item in the top nav ul. The idea was to write a script that would extract li's buried in divs and store them, lose the parent divs those lis were nested inside of and then reintroduce them as just more li's so that your script could find, index and include them when building the mobile menu select/option group.
    The functionality to parse the list and add select tags seems to break with this inclusion. or maybe an errant div tag? Does the logic seem sound enough? Thanks again for sharing this script. I hope I'm not rude to ask this.

    @mattkersley
    Copy link
    Owner

    If you can put up a test case demonstrating your issues I will take a look when I get five minutes spare, but I can't make promises as to when this will be (I get little free time at the moment).

    Cheers

    @ChrisVWL
    Copy link
    Author

    Hi, The followiing is a link to a test page using the above code snippet. Many thanks for any insights/recommendations!

    http://www.squintoptometry.com/yamb/squintdemo_new.php

    Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants