mobile nav javascript updated to still work with role='main-navigation' since changes affecting custom partials don't get updated with the standard update script
This commit is contained in:
parent
e7032f2f67
commit
9ef928588b
@ -1,6 +1,7 @@
|
|||||||
function getNav() {
|
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.main-navigation a').each(function(link) {
|
$('ul.main-navigation a').each(function(link) {
|
||||||
mobileNav.children('select').append('<option value="'+link.href+'">• '+link.text+'</option>');
|
mobileNav.children('select').append('<option value="'+link.href+'">• '+link.text+'</option>');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user