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

git-svn-id: https://develop.svn.wordpress.org/trunk@28758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett
2014-06-16 18:21:01 +00:00
parent 106e1dbedb
commit f738d86233
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' );