Changeset 31794
- Timestamp:
- 03/16/2015 06:50:50 PM (10 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/header.php
r31784 r31794 46 46 47 47 <div class="search-toggle"> 48 <a href="#search-container" class="screen-reader-text" ><?php _e( 'Search', 'twentyfourteen' ); ?></a>48 <a href="#search-container" class="screen-reader-text" aria-expanded="false" aria-controls="search-container"><?php _e( 'Search', 'twentyfourteen' ); ?></a> 49 49 </div> 50 50 -
trunk/src/wp-content/themes/twentyfourteen/js/functions.js
r31784 r31794 70 70 $( '.search-toggle' ).on( 'click.twentyfourteen', function( event ) { 71 71 var that = $( this ), 72 wrapper = $( '.search-box-wrapper' ); 72 wrapper = $( '#search-container' ), 73 container = that.find( 'a' ); 73 74 74 75 that.toggleClass( 'active' ); 75 76 wrapper.toggleClass( 'hide' ); 77 78 if ( that.hasClass( 'active' ) ) { 79 container.attr( 'aria-expanded', 'true' ); 80 } else { 81 container.attr( 'aria-expanded', 'false' ); 82 } 76 83 77 84 if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
Note: See TracChangeset
for help on using the changeset viewer.