Mobile nav fixed.

Now shows links instead of 'undefined'.
This commit is contained in:
peterboni 2013-03-10 13:23:52 +08:00
parent 98013543d9
commit dee2900ba2

View File

@ -2,10 +2,10 @@ function getNav() {
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&hellip;</option>');
$('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+'">&raquo; '+link.text+'</option>');
});
$('ul.subscription a').each(function(link) {
$('ul.subscription a').each(function(i, link) {
mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
});
mobileNav.children('select').bind('change', function(event) {