1// JavaScript Document 2 3// ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ 4document.querySelector('#wrapper').insertAdjacentHTML('beforeend', '<menu id="navButton">Menu</menu>'); 5document.querySelector('#navButton').addEventListener('click', function(){ 6 var sel = document.querySelector('body'); 7 if (sel.classList.contains('nav')) { 8 sel.classList.remove('nav'); 9 } else { 10 sel.classList.add('nav'); 11 } 12}); 13 14 15// ã¹ã¯ãã¼ã«æ¤ç¥ 16if (window.scrollY > 0) { 17 document.querySelector('body').classList.remove('scrollTop'); 18} 19window.addEventListener('scroll', function(){ 20 if (window.scrollY > 0) { 21 document.querySelector('body').classList.remove('scrollTop'); 22 } else { 23 document.querySelector('body').classList.add('scrollTop'); 24 } 25}); 26 27 28// ãããã¸æ»ããªã³ã¯ 29document.querySelector('#pageTop a').addEventListener('click', function(){ 30 window.scroll({ 31 top: 0, 32 behavior: 'smooth' 33 }); 34}); 35 36 37// èªã¿è¾¼ã¿æ¤ç¥ 38$(window).on('load',function(){ 39 document.querySelector('body').classList.remove('do'); 40 document.querySelector('body').classList.add('done') 41}); 42 43 44 45 46
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.