Twenty Fourteen: fix masthead behavior in IE when a custom header image is present. Props Kau-Boy, lancewillett. Fixes #27220.

Built from https://develop.svn.wordpress.org/trunk@28758


git-svn-id: http://core.svn.wordpress.org/trunk@28571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2014-06-16 18:22:14 +00:00
parent aa162f365e
commit 005d30e820
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ function twentyfourteen_scripts() {
) );
}
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true );
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140616', true );
}
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );

View File

@ -94,7 +94,7 @@
mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
_window.on( 'scroll.twentyfourteen', function() {
if ( ( window.scrollY > mastheadOffset ) && ( mastheadHeight < 49 ) ) {
if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
body.addClass( 'masthead-fixed' );
} else {
body.removeClass( 'masthead-fixed' );