1$("#main_visual_wrap").each(function () { 2 var hh = $(window).outerHeight() - $(this).offset().top; 3 if ($(window).width() <= 700) { 4 hh = $(window).outerHeight() - $(this).offset().top; 5 } 6 7 $(this).css("height", hh + "px"); 8}); 9 10if ($(".swiper-container_wrap.type_top").length > 0) { 11 $(".swiper-container_wrap.type_top").each(function () { 12 var all_kazu = $(this) 13 .children(".swiper-container") 14 .children(".swiper-wrapper") 15 .children(".swiper-slide").length; 16 if (all_kazu > 1) { 17 if ($(this).attr("id") === undefined) { 18 var id = 19 "slide_type_top-" + $(".swiper-container_wrap.type_top").index(this); 20 21 $(this).attr("id", id); 22 23 var slider = new Swiper("#" + id + " > .swiper-container", { 24 navigation: { 25 nextEl: "#" + id + " > .swiper-arrow_wrap .swiper-button-next", 26 prevEl: "#" + id + " > .swiper-arrow_wrap .swiper-button-prev", 27 }, 28 pagination: { 29 el: "#" + id + " > .swiper-pagination_wrap .swiper-pagination", 30 clickable: true, 31 }, 32 autoplay: { 33 delay: 5000, 34 disableOnInteraction: false, 35 }, 36 speed: 1500, 37 loop: true, 38 direction: "horizontal", 39 effect: "fade", 40 spaceBetween: 0, 41 }); 42 43 $("#" + id + " > .swiper-arrow_wrap .swiper-arrow_number") 44 .find(".now") 45 .text("1"); 46 $("#" + id + " > .swiper-arrow_wrap .swiper-arrow_number") 47 .find(".all") 48 .text(all_kazu); 49 50 setTimeout(function () { 51 $(window).on("resize", function () { 52 slider.autoplay.start(); 53 }); 54 }, 2000); 55 56 slider.autoplay.start(); 57 58 $("#" + id + "").click(function () { 59 slider.slideNext(); 60 }); 61 62 $("#" + id + "") 63 .find(".swiper-slide.swiper-slide-active") 64 .each(function () { 65 var kazu = Number($(this).attr("data-swiper-slide-index")); 66 $("#" + id + "") 67 .find('.swiper-slide[data-swiper-slide-index="0"]') 68 .find(".img_cover") 69 .addClass("zoom"); 70 }); 71 72 slider.on("slideChangeTransitionStart", function () { 73 var zoom_kazu; 74 $("#" + id + "") 75 .find(".swiper-slide.swiper-slide-active") 76 .each(function () { 77 zoom_kazu = Number($(this).attr("data-swiper-slide-index")); 78 $("#" + id + "") 79 .find( 80 '.swiper-slide[data-swiper-slide-index="' + zoom_kazu + '"]' 81 ) 82 .find(".img_cover") 83 .addClass("zoom"); 84 }); 85 86 $("#" + id + "") 87 .children(".swiper-container") 88 .children(".swiper-wrapper") 89 .children(".swiper-slide.swiper-slide-active") 90 .each(function () { 91 var kazu = Number($(this).attr("data-swiper-slide-index")) + 1; 92 $("#" + id + " > .swiper-arrow_wrap .swiper-arrow_number") 93 .find(".now") 94 .text(kazu); 95 }); 96 97 slider.autoplay.stop(); 98 }); 99 slider.on("slideChangeTransitionEnd", function () { 100 var zoom_kazu; 101 $("#" + id + "") 102 .find(".swiper-slide.swiper-slide-active") 103 .each(function () { 104 zoom_kazu = Number($(this).attr("data-swiper-slide-index")); 105 $("#" + id + "") 106 .find(".swiper-slide") 107 .not('[data-swiper-slide-index="' + zoom_kazu + '"]') 108 .find(".img_cover") 109 .removeClass("zoom"); 110 }); 111 112 slider.autoplay.start(); 113 }); 114 } 115 } else { 116 $(this).addClass("slide_no"); 117 $(this).find(".swiper-arrow_wrap").remove(); 118 $(this).find(".swiper-pagination_wrap").remove(); 119 } 120 }); 121} 122 123$(function () { 124 function setPickup() { 125 const list = document.getElementById("js-pickup-list"); 126 //WP REST API 127 var url = 128 "https://globalhotels.jp/wp-json/wp/v2/pickup_en?_embed&per_page=3"; 129 //GETã§åå¾ 130 131 $.ajax({ 132 type: "GET", 133 url: url, 134 dataType: "json", 135 }) 136 .done(function (data) { 137 data.forEach((elm) => { 138 const title = elm.title.rendered; 139 const content = elm.content.rendered; 140 let date = elm.date; 141 date = date.split("T")[0].split("-").join("."); 142 143 const link = elm.link; 144 const img = elm._embedded && elm._embedded["wp:featuredmedia"] 145 ? elm._embedded["wp:featuredmedia"][0].source_url 146 : ''; // ããã©ã«ãã®ç»åãè¨å® 147 148 let li = document.createElement("li"); 149 li.innerHTML = ` <a href="${link}" class="pickup__list-in"> 150 <figure><img src="${img}" alt=""></figure> 151 <time datetime="${date}">${date}</time> 152 <h4>${title}</h4> 153 <div class="pickup__list-txt -view-more"> 154 ${content} 155 </div> 156 </a>`; 157 list.appendChild(li); 158 }); 159 }) 160 .fail(function (XMLHttpRequest, textStatus, errorThrown) { 161 console.log(errorThrown); 162 }); 163 } 164 setPickup(); 165 166 function setInformation() { 167 const list = document.getElementById("js-dl"); 168 //WP REST API 169 var url = 170 "https://globalhotels.jp/wp-json/wp/v2/information_en?_embed"; 171 //GETã§åå¾ 172 173 $.ajax({ 174 type: "GET", 175 url: url, 176 dataType: "json", 177 }) 178 .done(function (data) { 179 data.forEach((elm) => { 180 const title = elm.title.rendered; 181 let date = elm.date; 182 date = date.split("T")[0].split("-").join("."); 183 let dt = document.createElement("dt"); 184 dt.innerHTML = `<time datetime="${date}">${date}</time>`; 185 let dd = document.createElement("dd"); 186 dd.innerHTML = title; 187 list.appendChild(dt); 188 list.appendChild(dd); 189 }); 190 }) 191 .fail(function (XMLHttpRequest, textStatus, errorThrown) { 192 console.log(errorThrown); 193 }); 194 } 195 setInformation(); 196});
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.