1$(function () { 2 var state = false; 3 var scrollpos; 4 var flg = 0; 5 $('#nav__open').on('click', function () { 6 $(this).toggleClass('on'); 7 $('.head-nav-inner').toggleClass('on'); 8 flg = 1; 9 if (state == false) { 10 scrollpos = $(window).scrollTop(); 11 $('body').addClass('fixed').css({ 'top': -scrollpos }); 12 state = true; 13 if (state == true) { 14 $(document).on('click', function (event) { 15 if (!$(event.target).closest('.head-nav-inner').length && flg == 1) { 16 $('#nav__open').removeClass('on'); 17 $('.head-nav-inner').removeClass('on'); 18 $('body').css({ 'top': 0 }).removeClass('fixed'); 19 window.scrollTo(0, scrollpos); 20 state = false; 21 flg = 0; 22 } 23 }); 24 } 25 } else { 26 $('body').removeClass('fixed').css({ 'top': 0 }); 27 window.scrollTo(0, scrollpos); 28 state = false; 29 } 30 }); 31});
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.