1/** 2 * File custom.js. 3 * 4 * Theme Customizer enhancements for a better user experience. 5 * 6 * Contains handlers to make Theme Customizer preview reload changes asynchronously. 7 */ 8 9 ( function( $ ) { 10 11 //Fix dot for main menu 12 13 $( "#primary-menu li" ).has( "ul" ).addClass( "iot-dot-menu" ); 14 $( ".iot-dot-menu>a" ).addClass( "iot-dot-menu-a" ); 15 16 17 // Custom offcanvas menu 18 19 $("#site-navigation").append('<button id="iot-open-menu-focus" class="iot-menu-left-open" ><span class="dashicons dashicons-menu"></span></button>'); 20 21 $("#mobile-nav-output").append('<aside id="iot-menu-left"><button class="iot-menu-left-close" ><span class="dashicons dashicons-menu"></span></button></aside><div class="iot-menu-left-filter"></div>'); 22 23 $clone_menu = $("#primary-menu").clone(); 24 $clone_menu.removeAttr("id class aria-expanded"); 25 $clone_menu.addClass( "iot-menu-left-ul" ); 26 27 $("#iot-menu-left").append($clone_menu); 28 29 $(".iot-menu-left-ul ul, .iot-menu-left-ul li, .iot-menu-left-ul a").removeAttr("id class"); 30 $clone_menu.append('<li><a href="" id="accessibility-close-mobile-menu"></a></li>'); 31 32 /// 33 $(".iot-menu-left-open").on("click focus", function(e) { 34 e.preventDefault(); 35 e.stopPropagation(); 36 e.stopImmediatePropagation(); 37 $("#iot-menu-left").animate({left: '0'}); 38 $(".iot-menu-left-filter").animate({left: '0'}); 39 $("body").animate({left: '250px'}); 40 $("body").css({"overflow": "hidden"}); 41 }); 42 43 $("#accessibility-close-mobile-menu").focusin(e => { 44 $(".iot-menu-left-close").click(); 45 }); 46 47 /// 48 49 $(".iot-menu-left-filter, .iot-menu-left-close").click(function(){ 50 $("#iot-menu-left").animate({left: '-250px'}); 51 $(".iot-menu-left-filter").animate({left: '-100%'}); 52 $("body").animate({left: '0'}); 53 setTimeout( function() { 54 $("body").css({"position":"","left":"","overflow":""}); 55 },405); 56 }); 57 58 59 $( document ).on( 'keydown', function ( e ) { 60 if ( e.keyCode === 27 ) { 61 $(".iot-menu-left-close").click(); 62 document.getElementById('iot-skip-to-content').focus(); 63 } 64 65 $("#iot-open-menu-focus").on('keydown', function(e) { 66 if (e.shiftKey && e.keyCode === 9) { 67 document.getElementById('iot-skip-to-content').focus(); 68 $(".iot-menu-left-close").click(); 69 70 71 } 72 }); 73 74 75 76 }); 77 78 79 80} )( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.