Twenty Fourteen: reposition the window on jump-to-anchor to account for header height. Props obenland, fixes #26213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-12-03 18:35:10 +00:00
parent 4d6ec7fa96
commit 5b54845df7
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -48,6 +48,9 @@
}
element.focus();
// Repositions the window on jump-to-anchor to account for header height.
window.scrollBy( 0, -80 );
}
} );