Twenty Thirteen: make sure submenu links work correctly on small screens with touch events.
Fixes #31762, props davidhamiltron. git-svn-id: https://develop.svn.wordpress.org/trunk@31932 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ae1538daed
commit
e6614d639b
@ -170,7 +170,7 @@ function twentythirteen_scripts_styles() {
|
|||||||
wp_enqueue_script( 'jquery-masonry' );
|
wp_enqueue_script( 'jquery-masonry' );
|
||||||
|
|
||||||
// Loads JavaScript file with functionality specific to Twenty Thirteen.
|
// Loads JavaScript file with functionality specific to Twenty Thirteen.
|
||||||
wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true );
|
wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
|
||||||
|
|
||||||
// Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
|
// Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
|
||||||
wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
|
wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
// Fix sub-menus for touch devices.
|
// Fix sub-menus for touch devices.
|
||||||
if ( 'ontouchstart' in window ) {
|
if ( 'ontouchstart' in window ) {
|
||||||
menu.find( '.menu-item-has-children > a' ).on( 'touchstart.twentythirteen', function( e ) {
|
menu.find( '.menu-item-has-children > a, .page_item_has_children > a' ).on( 'touchstart.twentythirteen', function( e ) {
|
||||||
var el = $( this ).parent( 'li' );
|
var el = $( this ).parent( 'li' );
|
||||||
|
|
||||||
if ( ! el.hasClass( 'focus' ) ) {
|
if ( ! el.hasClass( 'focus' ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user