1// ã¿ã 2const tabList = document.querySelectorAll('.tab-list-item'); 3// ã¿ãã³ã³ãã³ã 4const tabContent = document.querySelectorAll('.tab-contents-item'); 5 6// DOMãèªã¿è¾¼ã¿çµãã£ãã 7document.addEventListener('DOMContentLoaded', function() { 8 // åã¿ãã«ã¯ãªãã¯ã¤ãã³ããä»ä¸ 9 for (let i = 0; i < tabList.length; i++) { 10 tabList[i].addEventListener('click', tabSwitch); 11 } 12 13 // ã¿ããã¯ãªãã¯ããã¨ãã®å¦ç 14 function tabSwitch() { 15 // ãã¹ã¦ã®ã¿ãããactiveã¯ã©ã¹ãåé¤ 16 document.querySelectorAll('.tab-list-item.active').forEach(function(el) { 17 el.classList.remove('active'); 18 }); 19 20 // ã¯ãªãã¯ãããã¿ãã«activeã¯ã©ã¹ã追å 21 this.classList.add('active'); 22 23 // ãã¹ã¦ã®ã¿ãã³ã³ãã³ãããshowã¯ã©ã¹ãåé¤ 24 document.querySelectorAll('.tab-contents-item.show').forEach(function(el) { 25 el.classList.remove('show'); 26 }); 27 28 // ã¿ãã®ã¤ã³ããã¯ã¹ãåå¾ 29 const aryTabs = Array.prototype.slice.call(tabList); 30 const index = aryTabs.indexOf(this); 31 32 // 対å¿ããã¿ãã³ã³ãã³ãã«showã¯ã©ã¹ã追å 33 tabContent[index].classList.add('show'); 34 } 35});
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.