1$(document).ready(function(){ 2 var now = new Date(); 3 var thisYear = now.getFullYear(); 4 var sec = $('.js-sec'); 5 var secLength = sec.length; 6 7 /* $('#js-select .current').text(thisYear + '年度');*/ 8 9 // ã»ã¯ã·ã§ã³ã«idä»ä¸ ã»ã¬ã¯ãè¦ç´ çæï¼pc:li / sp:optionï¼ 10 for (var i = 0; i < sec.length; i++) { 11 var year = thisYear - i 12 if (i === 0) { 13 sec.eq(i).addClass('current'); 14 } 15 sec.eq(i).attr('id', 'js-' + sec.eq(i).children('h2').children('.ttl-en').text()); 16 17 // pc 18/* $('<li>', { 19 class: 'js-select-item', 20 text: year + '年度', 21 'data-id': 'js-' + year, 22 }).appendTo('#js-select-pc');*/ 23 24 // sp 25/* $('<option>', { 26 text: year + '年度', 27 value: 'js-' + year, 28 }).appendTo('#js-select-sp');*/ 29 } 30 31 // pc 年度ãªã¹ã ãªã¼ãã³ 32 $('#js-select .current').on('click', function() { 33 $('#js-select').addClass('is-open') 34 $('#js-select-pc').slideDown(); 35 $(this).hide(); 36 }); 37 38 // pc å¹´åº¦é¸æ 39 $('.js-select-item').on('click', function() { 40 var target = $(this).data('id'); 41 openSec(target, $(this).text()); 42 }); 43 44 // sp å¹´åº¦é¸æ 45 $('#js-select-sp').on('change', function() { 46 var target = $(this).val(); 47 openSec(target, ''); 48 }); 49 50 // 年度ã»ã¯ã·ã§ã³ãªã¼ãã³ 51 function openSec(target,text) { 52 $('.js-sec').removeClass('current'); 53 $('#'+ target).addClass('current'); 54 if (text !== '') { 55 $('#js-select').removeClass('is-open'); 56 $('#js-select .current').text(text).show(); 57 $('#js-select-pc').slideUp(); 58 } 59 } 60});
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.