Make WordPress Core

Ticket #27220: 27220.diff

File 27220.diff, 678 bytes (added by Kau-Boy, 13 years ago)
  • wp-content/themes/twentyfourteen/js/functions.js

     
    8888                                mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
    8989
    9090                                _window.on( 'scroll.twentyfourteen', function() {
    91                                         if ( ( window.scrollY > mastheadOffset ) && ( mastheadHeight < 49 ) ) {
     91                                        if ( ( $( window ).scrollTop() > mastheadOffset ) && ( mastheadHeight < 49 ) ) {
    9292                                                body.addClass( 'masthead-fixed' );
    9393                                        } else {
    9494                                                body.removeClass( 'masthead-fixed' );