WordPress.org

Make WordPress Core

Changeset 38886


Ignore:
Timestamp:
10/24/2016 05:58:18 PM (3 years ago)
Author:
davidakennedy
Message:

Twenty Seventeen: Fix smooth scrolling skip link

The link was scrolling too far. The main problem was that the menuTop variable lost it's initial definition of 0, so all future subtractions were failing.

Props tywayne.

Fixes #38448.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/assets/js/global.js

    r38833 r38886  
    2424            navIsNotTooTall,
    2525            headerOffset,
    26             menuTop,
     26            menuTop = 0,
    2727            resizeTimer;
    2828
     
    150150             */
    151151            if ( $( 'body' ).hasClass( 'admin-bar' ) ) {
    152                 menuTop = -32;
     152                menuTop -= 32;
    153153            }
    154154            if ( $( 'body' ).hasClass( 'blog' ) ) {
Note: See TracChangeset for help on using the changeset viewer.