1document.addEventListener( 'DOMContentLoaded', function() { 2 const mobileMenuBtn = document.getElementById( 'sb-mobile-menu-btn' ); 3 const mobileMenu = document.getElementById( 'sb-mobile-navigation' ); 4 5 // Open Menu on Button Click 6 if ( mobileMenuBtn && mobileMenu ) { 7 mobileMenuBtn.addEventListener( 'click', function() { 8 mobileMenu.classList.toggle( 'hidden' ); 9 } ); 10 } 11 12 // Close Menu on Button or Backdrop click 13 const closeBtn = document.getElementById( 'sb-close-menu-btn' ); 14 const menuBackdrop = document.getElementById( 'sb-menu-backdrop' ); 15 16 if ( closeBtn ) { 17 closeBtn.addEventListener( 'click', function() { 18 mobileMenu.classList.toggle( 'hidden' ); 19 } ); 20 } 21 22 if ( menuBackdrop ) { 23 menuBackdrop.addEventListener( 'click', function() { 24 mobileMenu.classList.toggle( 'hidden' ); 25 } ); 26 } 27} );
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.