Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'wp_footer', function() { ?>
- <script>
- ( function( $ ) {
- 'use strict';
- $( document ).on( 'ready', function() {
- $( '.wpex-mobile-menu li.menu-item-has-children > a' ).each( function() {
- var $this = $( this );
- $this.attr( 'tabindex', 0 ); // lets give the links a tabindex
- $this.live( 'keyup', function( e ) {
- var code = e.keyCode || e.which;
- if ( code === 9 ) { // 9 is the js key code for tab
- $( this ).find( '> .wpex-open-submenu' ).trigger( 'click' ); // toggle the dropdown function whenever we tab onto a link that has submenus
- }
- } );
- } );
- } );
- } ( jQuery ) );
- </script>
- <?php }, 99 );
Add Comment
Please, Sign In to add comment