From f738d862338e3c632e73a3bcb699032e67267dfb Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 16 Jun 2014 18:21:01 +0000 Subject: [PATCH] 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 --- src/wp-content/themes/twentyfourteen/functions.php | 2 +- src/wp-content/themes/twentyfourteen/js/functions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 9ddeb39d80..19f0384048 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -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' ); diff --git a/src/wp-content/themes/twentyfourteen/js/functions.js b/src/wp-content/themes/twentyfourteen/js/functions.js index 3ec30fef0b..7eddd83ef3 100644 --- a/src/wp-content/themes/twentyfourteen/js/functions.js +++ b/src/wp-content/themes/twentyfourteen/js/functions.js @@ -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' );