1document.addEventListener("DOMContentLoaded", function () { 2 const checkboxes = document.querySelectorAll('input[name="chance[data][]"]'); 3 const nextButton = document.querySelector(".form-button"); 4 const backButton = document.querySelector(".common-button.white.inputpage"); // æ»ããã¿ã³ 5 const step1 = document.getElementById("step1"); 6 const step2 = document.getElementById("step2"); 7 const contactForm = document.getElementById("contact-form"); 8 9 function toggleButton() { 10 const isChecked = Array.from(checkboxes).some(checkbox => checkbox.checked); 11 if (isChecked) { 12 nextButton.classList.add("active"); 13 nextButton.style.pointerEvents = "auto"; 14 nextButton.style.opacity = "1"; 15 } else { 16 nextButton.classList.remove("active"); 17 nextButton.style.pointerEvents = "none"; 18 nextButton.style.opacity = "0.5"; 19 } 20 } 21 22 checkboxes.forEach(checkbox => { 23 checkbox.addEventListener("change", toggleButton); 24 }); 25 26 toggleButton(); 27 28 // ãã¼ã¸èªã¿è¾¼ã¿æã«ãã§ãã¯æ¸ã¿ã®é ç®ãããã° step2 ã表示ãã¹ã¯ãã¼ã« 29 const isAlreadyChecked = Array.from(checkboxes).some(checkbox => checkbox.checked); 30 if (isAlreadyChecked && step1 && step2 && contactForm) { 31 step1.style.display = "none"; 32 step2.style.display = "block"; 33 setTimeout(() => { 34 contactForm.scrollIntoView({ behavior: "smooth" }); 35 }, 100); 36 } 37 38 // 次ã¸ãã¿ã³ãã¯ãªãã¯ã§ step1 -> step2 ã«é·ç§» 39 nextButton.addEventListener("click", function (event) { 40 event.preventDefault(); 41 if (step1 && step2 && contactForm) { 42 step1.style.display = "none"; 43 step2.style.display = "block"; 44 setTimeout(() => { 45 contactForm.scrollIntoView({ behavior: "smooth" }); 46 }, 100); 47 } 48 }); 49 50 // æ»ããã¿ã³ãã¯ãªãã¯ã§ step2 -> step1 ã«æ»ã 51 backButton.addEventListener("click", function () { 52 if (step1 && step2) { 53 step2.style.display = "none"; 54 step1.style.display = "block"; 55 setTimeout(() => { 56 step1.scrollIntoView({ behavior: "smooth" }); 57 }, 100); 58 } 59 }); 60}); 61 62$(document).ready(function() { 63 // Add or remove the 'active' class based on scroll position 64 $(window).on('scroll', function() { 65 const scrollTop = $(window).scrollTop(); 66 const contactTop = $('#contact-form').offset().top; 67 const contactHeight = $('#contact-form').outerHeight(); // é«ããåå¾ 68 69 // 200pxã¹ã¯ãã¼ã«ãããactiveãä»ä¸ããcontact-formã表示ããããåé¤ 70 if (scrollTop > 200 && scrollTop < (contactTop - contactHeight)) { 71 $('#cart').addClass('active'); 72 } else { 73 $('#cart').removeClass('active'); 74 } 75 }); 76}); 77 78// ææãã«ã¬ã³ãã¼ãã鏿ä¸å¯ã«ãã 79jQuery(function($) { 80 var holidays = []; 81 82 // æ¥æ¬ã®ç¥æ¥APIãããã¼ã¿ãåå¾ 83 fetch("https://holidays-jp.github.io/api/v1/date.json") 84 .then(response => response.json()) 85 .then(data => { 86 // APIã®ãã¼ï¼ç¥æ¥ã®æ¥ä»ï¼ãåå¾ããé åã«æ ¼ç´ 87 holidays = Object.keys(data); 88 89 $(".hasDatepicker").datepicker("option", { 90 firstDay: 0, // æåã®ææ¥ãæ¥ææ¥ã«è¨å®ï¼0 = æ¥ææ¥ï¼ 91 beforeShowDay: function(date) { 92 var day = date.getDay(); 93 var dateString = date.getFullYear() + '-' + 94 ('0' + (date.getMonth() + 1)).slice(-2) + '-' + 95 ('0' + date.getDate()).slice(-2); 96 97 var isWeekend = (day === 0 || day === 6); // 忥 98 var isHoliday = holidays.includes(dateString); // APIããåå¾ããç¥æ¥ 99 100 return [(!isWeekend && !isHoliday)]; // 忥ã»ç¥æ¥ãç¡å¹å 101 }, 102 minDate: 0 // 仿¥ä»¥éã®ã¿é¸æå¯è½ 103 }); 104 }) 105 .catch(error => console.error("ç¥æ¥ãã¼ã¿ã®åå¾ã«å¤±æãã¾ãã", error)); 106});
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.