1/*============================================================== 2 pull menu 3 ==============================================================*/ 4 5function bindEvent(el, eventName, eventHandler) { 6 if (el.addEventListener) { 7 el.addEventListener(eventName, eventHandler, false); 8 } else if (el.attachEvent) { 9 el.attachEvent('on' + eventName, eventHandler); 10 } 11} 12 13(function () { 14 15 var bodyEl = document.body, 16 //content = document.querySelector( '.content-wrap' ), 17 openbtn = document.getElementById('open-button'), 18 closebtn = document.getElementById('close-button'), 19 isOpen = false; 20 21 function init() { 22 initEvents(); 23 } 24 25 function initEvents() { 26 if (openbtn) { 27 bindEvent(openbtn, 'click', toggleMenu); 28 29 } 30 //openbtn.addEventListener( 'click', toggleMenu ); 31 if (closebtn) { 32 33 bindEvent(closebtn, 'click', toggleMenu); 34 //closebtn.addEventListener( 'click', toggleMenu ); 35 } 36 37 // close the menu element if the target itôs not the menu element or one of its descendants.. 38 39 } 40 41 function toggleMenu() { 42 43 if (isOpen) { 44 classie.remove(bodyEl, 'show-menu'); 45 if ( $( ".full-width-pull-menu" ).length ) { 46 classie.remove(bodyEl, 'overflow-hidden'); 47 classie.remove(bodyEl, 'position-fixed'); 48 } 49 } 50 else { 51 classie.add(bodyEl, 'show-menu'); 52 53 if ( $( ".full-width-pull-menu" ).length ) { 54 classie.add(bodyEl, 'overflow-hidden'); 55 classie.add(bodyEl, 'position-fixed'); 56 } 57 58 } 59 isOpen = !isOpen; 60 } 61 62 init(); 63 64})();
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.