Add megamenu functionality? #17

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

Comments

Projects
None yet
2 participants

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.

    Owner

    mattkersley commented Apr 26, 2012

    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

    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 join this conversation on GitHub. Already have an account? Sign in to comment