Browse code

improved navigation selection and fixed mobile nav select

Brandon Mathis authored on 21/07/2011 at 19:32:10
Showing 3 changed files
... ...
@@ -1,4 +1,4 @@
1
-<ul role="subscription" data-subscription="rss{% if site.subscribe_email %} email{% endif %}">
1
+<ul role=subscription data-subscription="rss{% if site.subscribe_email %} email{% endif %}">
2 2
   <li><a href="{{ site.subscribe_rss }}" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
3 3
   {% if site.subscribe_email %}
4 4
     <li><a href="{{ site.subscribe_email }}" rel="subscribe-email" title="subscribe via email">Email</a></li>
... ...
@@ -2,7 +2,7 @@
2 2
 {% include head.html %}
3 3
 <body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %}>
4 4
   <header>{% include header.html %}</header>
5
-  <nav>{% include navigation.html %}</nav>
5
+  <nav role=navigation>{% include navigation.html %}</nav>
6 6
   <div id="main">
7 7
     <div id="content">
8 8
       {{ content | expand_urls: root_url | smart_quotes  }}
... ...
@@ -1,7 +1,7 @@
1 1
 function getNav(){
2
-  var mobileNav = $('body > nav fieldset[role=site-search]').after('<fieldset role="mobile-nav"></fieldset>').next().append('<select></select>');
2
+  var mobileNav = $('nav[role=navigation] fieldset[role=site-search]').after('<fieldset role="mobile-nav"></fieldset>').next().append('<select></select>');
3 3
   mobileNav.children('select').append('<option value="">Navigate&hellip;</option>');
4
-  $($('body > nav ul[role=main-nav] a')).each(function(link) {
4
+  $($('ul[role=main-navigation] a')).each(function(link) {
5 5
     mobileNav.children('select').append('<option value="'+link.href+'">&bull; '+link.text+'</option>')
6 6
   });
7 7
   mobileNav.children('select').bind('change', function(event){