Twenty Fourteen: Focus search box on search menu click, props kovshenin for original patch. Fixes #24895.
Built from https://develop.svn.wordpress.org/trunk@25064 git-svn-id: http://core.svn.wordpress.org/trunk@25050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dc983adb2e
commit
3054d405e6
|
@ -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' );
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue