diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index fe8574d49e..7e488aee50 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -213,7 +213,7 @@ function twentyfourteen_scripts() { if ( is_singular() && wp_attachment_is_image() ) wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); - wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130402', true ); + wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130820', true ); } add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); diff --git a/wp-content/themes/twentyfourteen/js/theme.js b/wp-content/themes/twentyfourteen/js/theme.js index 6d430c46f6..719540d864 100644 --- a/wp-content/themes/twentyfourteen/js/theme.js +++ b/wp-content/themes/twentyfourteen/js/theme.js @@ -43,6 +43,8 @@ if ( $socialLinksToggle.hasClass( 'active' ) ) { $socialLinksToggle.removeClass( 'active' ); } + if ( $( this ).hasClass( 'active' ) ) + $searchBoxWrapper.find( '.search-field' ).focus(); } ); // DOM manupilations for mobile header