mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-12-25 00:48:49 -05:00
Mobile nav fixed.
Now shows links instead of 'undefined'.
This commit is contained in:
parent
98013543d9
commit
dee2900ba2
@ -2,10 +2,10 @@ function getNav() {
|
|||||||
var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
|
var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
|
||||||
mobileNav.children('select').append('<option value="">Navigate…</option>');
|
mobileNav.children('select').append('<option value="">Navigate…</option>');
|
||||||
$('ul[role=main-navigation]').addClass('main-navigation');
|
$('ul[role=main-navigation]').addClass('main-navigation');
|
||||||
$('ul.main-navigation a').each(function(link) {
|
$('ul.main-navigation a').each(function(i, link) {
|
||||||
mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
|
mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
|
||||||
});
|
});
|
||||||
$('ul.subscription a').each(function(link) {
|
$('ul.subscription a').each(function(i, link) {
|
||||||
mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
|
mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
|
||||||
});
|
});
|
||||||
mobileNav.children('select').bind('change', function(event) {
|
mobileNav.children('select').bind('change', function(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user