[wp-trac] [WordPress Trac] #21562: Twenty Twelve: improve navigation to be mobile-first and not rely on JS for hiding and showing

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 23 15:54:34 UTC 2012


#21562: Twenty Twelve: improve navigation to be mobile-first and not rely on JS for
hiding and showing
---------------------------+------------------
 Reporter:  cfinke         |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.5
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------

Comment (by lancewillett):

 Replying to [comment:28 obenland]:
 > What it comes down to is having the transition effect or not, right?

 Yep. I think for older browsers no effect is fine — just hide and show it
 with CSS when they hover or click on the menu-toggle button.

 For selecting the menu by ID without jQuery, something like this might
 work:

 {{{
 var menu = document.getElementById( 'masthead' ).getElementsByTagName(
 'ul' )[0];
 }}}

 Or target an ID value of "site-navigation" and change line 38 in
 header.php to:

 {{{
 <nav id="site-navigation" class="main-navigation" role="navigation">
 }}}

 We probably don't need both classes there, it was a hold-out from the JS
 changing the class to "main-small-navigation".

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21562#comment:31>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list