Ticket #30575: #30575.patch
| File #30575.patch, 1.1 KB (added by , 4 years ago) |
|---|
-
functions.js
119 119 $( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() { 120 120 $( this ).parents().toggleClass( 'focus' ); 121 121 } ); 122 } ); 122 // Enable hover for dropdown menu for touch devices 123 if ( 'ontouchstart' in window ) { 124 $('body').on( 'touchstart.twentyfourteen', '.menu-item-has-children > a, .page_item_has_children > a', function( e ) { 125 var el = $( this ).parent( 'li' ); 126 127 if ( ! el.hasClass( 'focus' ) ) { 128 e.preventDefault(); 129 el.toggleClass( 'focus' ); 130 el.siblings( '.focus').removeClass( 'focus' ); 131 } 132 }); 133 } 134 }); 123 135 124 136 /** 125 137 * Add or remove ARIA attributes.