1( function(window, $, undefined) { 2 'use strict'; 3 4 $('nav').before('<button class="menu-toggle" role="button" aria-pressed="false"></button>'); // Add toggles to menus 5 $('nav .sub-menu').before('<button class="sub-menu-toggle" role="button" aria-pressed="false"></button>'); // Add toggles to sub menus 6 7 // Show/hide the navigation 8 $('.menu-toggle').on('click', function() { 9 var $this = $(this); 10 $this.attr('aria-pressed', function(index, value) { 11 return 'false' === value ? 'true' : 'false'; 12 }); 13 14 $this.toggleClass('activated'); 15 setTimeout(function() {$('.content-wrap').toggleClass('reduced_z_index');}, 100); 16 $this.next('nav, .sub-menu').slideToggle('fast', function() { 17 // Allow menu to become inline block rather than displayNone when resizing (mostly relevant for iPad) 18 $this.next('nav, .sub-menu').css('display', '').toggleClass('displayNone displayBlock'); 19 }); 20 }); 21 $('.sub-menu-toggle').on('click', function() { 22 var $this = $(this); 23 $this.toggleClass('activated'); 24 $this.attr('aria-pressed', function(index, value) { 25 return 'false' === value ? 'true' : 'false'; 26 }); 27 $this.next('.sub-menu').slideToggle(200, function() { 28 // Allow menu to become inline block rather than displayNone when resizing (mostly relevant for iPad) 29 $this.next('.sub-menu').toggleClass('displayNone displayBlock'); 30 }); 31 }); 32})(this, 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.