1$(document).ready(function () { 2 const navToggler = $('.app-toggler'); 3 const body = $('body'); 4 const menu = $(navToggler.data('target')); 5 const backdrop = $('.app-menu-backdrop'); 6 7 function toggleNav() { 8 const menuIsOpen = menu.hasClass('show'); 9 10 // PrzeÅÄ czanie klas 11 navToggler.toggleClass('active', !menuIsOpen); 12 body.toggleClass('overflow-hidden', !menuIsOpen); 13 menu.toggleClass('show', !menuIsOpen); 14 15 // ZarzÄ dzanie widocznoÅciÄ backdropu 16 if (!menuIsOpen) { 17 backdrop.removeClass('d-none'); 18 setTimeout(() => backdrop.addClass('show'), 50); 19 } else { 20 backdrop.removeClass('show'); 21 setTimeout(() => backdrop.addClass('d-none'), 300); 22 } 23 } 24 25 // ObsÅuga klikniÄcia na toggler 26 navToggler.on('click', toggleNav); 27 28 // ObsÅuga klikniÄcia poza menu 29 backdrop.on('click', function() { 30 if (menu.hasClass('show')) toggleNav(); 31 }); 32 33 // ObsÅuga klawisza Escape 34 $(document).on('keydown', function (e) { 35 if (e.key === 'Escape' && menu.hasClass('show')) { 36 toggleNav(); 37 } 38 }); 39});
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.