js/navigation.js
// Toggle `focus` class to allow submenu access on tablets.
Toggle `focus` class to allow submenu access on tablets.
Toggle ` focus ` class to allow submenu access on tablets .
function toggleFocusClassTouchScreen() {
				if ( window.innerWidth >= 910 ) {
					$( document.body ).on( 'touchstart.educationHub', function( e ) {
						if ( ! $( e.target ).closest( '.main-navigation li' ).length ) {
							$( '.main-navigation li' ).removeClass( 'focus' );
						}
					} );
					siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).on( 'touchstart.educationHub', function( e ) {
						var el = $( this ).parent( 'li' );
						if ( ! el.hasClass( 'focus' ) ) {
							e.preventDefault();
							el.toggleClass( 'focus' );
							el.siblings( '.focus' ).removeClass( 'focus' );
						}
					} );
				} else {
					siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.educationHub' );
				}
			}
function toggleFocusClassTouchScreen ( ) { if ( window . innerWidth >= 910 ) { $ ( document . body ) . on ( 'touchstart.educationHub' , function ( e ) { if ( ! $ ( e . target ) . closest ( '.main-navigation li' ) . length ) { $ ( '.main-navigation li' ) . removeClass ( 'focus' ) ; } } ) ; siteNavigation . find ( '.menu-item-has-children > a, .page_item_has_children > a' ) . on ( 'touchstart.educationHub' , function ( e ) { var el = $ ( this ) . parent ( 'li' ) ; if ( ! el . hasClass ( 'focus' ) ) { e . preventDefault ( ) ; el . toggleClass ( 'focus' ) ; el . siblings ( '.focus' ) . removeClass ( 'focus' ) ; } } ) ; } else { siteNavigation . find ( '.menu-item-has-children > a, .page_item_has_children > a' ) . unbind ( 'touchstart.educationHub' ) ; } }
Toggle `focus` class to allow submenu access on tablets.
Toggle ` focus ` class to allow submenu access on tablets .