PageSourceSearch

https://hotel-koryu.jp/js/script.js?251218

js hotel-koryu.jp collected 2026-10-04 12:33:11 UTC 10,067 bytes, 336 lines download raw bytes

1// UA判定
2var ua = navigator.userAgent.toLowerCase();
3var isMobile = /iphone/.test(ua)||/android(.+)?mobile/.test(ua);
4
5/* ------------------------------------------------------ */
6/* spとpcでリンクURL出し分け
7(レスポンシブ非対応ページへのリンク用、完了したら削除してください) */
8/* ------------------------------------------------------ */
9// $(function(){
10// 	if(isMobile){
11// 		$("body").find("[data-sp]").each(function(){
12// 			$(this).attr("href",$(this).attr("data-sp"));
13// 		});
14// 	}
15// });
16
17/* ------------------------------------------------------ */
18/* header */
19/* ------------------------------------------------------ */
20$(function(){
21	$("header .menu-btn").on("click",function(){
22		$(this).toggleClass("active");
23		$("header #gnav .menu").slideToggle(300);
24	});
25});
26
27$(function(){
28    $('.gnavi__list .toggle_btn').click(function(){
29        $('.dropdown__lists').toggleClass('open');
30    });
31});
32
33$(function(){
34    $('.accordion_one .ac_header').click(function(){
35      $(this).next('.ac_inner').slideToggle();
36      $(this).toggleClass("open");
37    });
38});
39
40$(function(){
41    $('.menu__single a').click(function(){
42        $('.menu__single').toggleClass('open');
43    });
44});
45
46/* ------------------------------------------------------ */
47/* 日付選択+検索ボタン */
48/* ------------------------------------------------------ */
49/*$(function(){
50	for(i=1;i<100;i++){
51		if(i==2){
52			$("header #search .item.num select").append('<option selected>'+i+'</option>');
53		}else{
54			$("header #search .item.num select").append('<option>'+i+'</option>');
55		}
56	}
57});*/
58
59$(function(){
60	//人数
61	//default
62	$('.num-more .adult_num').val(1);
63	$('.num-more .child_num').val(0);
64
65	$('header .item.num').on('click',function(){
66		if($(this).next('.num-more').is(':hidden')) {
67			$(this).next('.num-more').fadeIn();
68		} else {
69			$(this).next('.num-more').fadeOut();
70		}
71	});
72
73	$('.num-more select').change(function(){
74		var male = Number($('.adult_num.male').val());
75		var female = Number($('.adult_num.female').val());
76		//var child1 = Number($('.child_num.child1').val());
77		//var child2 = Number($('.child_num.child2').val());
78		//var child3 = Number($('.child_num.child3').val());
79		//var child4 = Number($('.child_num.child4').val());
80		//var child5 = Number($('.child_num.child5').val());
81		var num1 = [male,female];
82		//var num2 = [child1,child2,child3,child4,child5];
83		//var num3 = [male,female,child1,child2,child3,child4,child5];
84
85		var sum1 = num1.reduce(function(a, x){return a + x;}, 0);
86		/*
87		var sum2 = num2.reduce(function(a, x){return a + x;}, 0);
88		var sum3 = num3.reduce(function(a, x){return a + x;}, 0);
89
90    var sum1 = num1.reduce((a,x) => a+=x,0);
91		var sum2 = num2.reduce((a,x) => a+=x,0);
92		var sum3 = num3.reduce((a,x) => a+=x,0);
93
94    $('.adult-sum').text(sum1);
95		$('.child-sum').text(sum2);
96		*/
97		$('.total-sum').text(sum1);
98	});
99	$(document).on('click touchend', function(event) {
100		if(!$(event.target).closest('header form .inner').length) {
101			$('header .num-more').fadeOut();
102		}
103	});
104});
105
106$(function(){
107	var today = new Date();
108	var myYear = today.getFullYear();
109	var myMonth = ("0"+(today.getMonth() + 1)).slice(-2);
110	var myDate = ("0"+(today.getDate())).slice(-2);
111
112	// $('[name="date1"]').val(myMonth + "/" + myDate);
113	// $('[name="date"]').val(myYear + "/" + myMonth + "/" + myDate);
114	// $('[name="date1"]').datepicker({dateFormat:"mm/dd",showMonthAfterYear: true,minDate: 0});
115	// $('[name="date"]').datepicker({dateFormat:"yy/mm/dd",showMonthAfterYear: true,minDate: 0});
116	$('[data-toggle="datepicker"]').val(myMonth + "/" + myDate);
117	$('[name="date"]').val(myYear + "/" + myMonth + "/" + myDate);
118	$('[data-toggle="datepicker"]').datepicker({dateFormat:"mm/dd",altFormat: 'yy/mm/dd',altField: '[name="date"]',showMonthAfterYear: true,minDate: 0});
119
120});
121
122$(function(){
123	$("header #search .btn01").click(function(){
124		var inputDate = $("header #search .item.date input.date1").val();
125		var inputDate = inputDate.split('/');
126		var year = inputDate[0];
127		var month = ("0"+ inputDate[1]).slice(-2);
128		var date = ("0"+ inputDate[2]).slice(-2);
129		// var stay = $("header #search .item.stay select").val();
130		// var num = $("header #search .item.num select").val();
131		var male = $('header #search .adult_num.male').val();
132		var female = $('header #search .adult_num.female').val();
133		//var child1 = $('header #search .child_num.child1').val();
134		//var child2 = $('header #search .child_num.child2').val();
135		//var child3 = $('header #search .child_num.child3').val();
136		//var child4 = $('header #search .child_num.child4').val();
137		//var child5 = $('header #search .child_num.child5').val();
138
139		//window.open('http://www3.489ban.net/v4/client/plan/search/customer/shimoda-y?year_month='+year+'-'+month+'&day='+date+'&stay='+stay+'&guest2102='+num+'&priceL=0&priceH=99999999&category=0&room='+room+'&is_calc_nop=0&plan_type_mode=1&date='+year+'-'+month+'-'+date,'_blank');
140
141		window.open('https://reserve.489ban.net/client/hotel-koryu/0/plan/search?date='+year+'-'+month+'-'+date+'+00%3A00%3A00&guests%5B21034%5D%5Badult%5D='+male+'&guests%5B21035%5D%5Badult%5D='+female,'_blank');
142		return false;
143	});
144});
145
146/* ------------------------------------------------------ */
147/* 表示用アニメーション */
148/* ------------------------------------------------------ */
149$(function() {
150	$('.animation,.fadeup').on('inview', function(event, isInView) {
151			if(isInView) {$(this).addClass('animated');}
152  	});
153	$('.fadeup-list').on('inview', function(event, isInView) {
154        if(isInView) {
155            $(this).find("li").each(function(i) {
156                $(this).delay(200*i).queue(function() {
157                    $(this).addClass("animated");
158                    $(this).dequeue();
159                });
160            });
161        }
162    });
163});
164
165/* ------------------------------------------------------ */
166/* matchHeight */
167/* ------------------------------------------------------ */
168$(function(){
169	$(".match").matchHeight();
170	$(".common-list01 li .box").matchHeight();
171});
172
173/* ------------------------------------------------------ */
174/* アンカーリンク */
175/* ------------------------------------------------------ */
176$(function(){
177	// $('a[href^="#"]').click(function() {
178		$('a[href^="#"]:not(.noscroll)').click(function() {		
179		var href= $(this).attr("href");
180		var target = $(href == "#" || href == "" ? 'html' : href);
181		var position = target.offset().top - 100;
182
183		$("body,html").animate({scrollTop:position}, 400, "swing");
184		return false;
185	});
186
187	if(location.hash){
188		var id = location.hash;
189		var adjust = $(id).offset().top - 100;
190		$("html,body").animate({scrollTop:adjust}, 0);
191	}
192});
193/* ------------------------------------------------------ */
194/* スクロール時の処理 */
195/* ------------------------------------------------------ */
196var timer2 = null;
197if($(window).innerWidth() > 1039){
198	var scrollnum = 820;
199}else{
200	var scrollnum = 200;
201}
202
203$(window).on('scroll',function() {
204	clearTimeout(timer2);
205	timer2 = setTimeout(function() {
206		if ($(window).scrollTop() > scrollnum) {
207			$("body,header").addClass("fixed");
208		} else {
209			$("body,header").removeClass("fixed");
210			$("header .menu-btn").removeClass("active");
211			$("header #gnav .menu").removeAttr("style");
212/*			$("header #search .item.date input").datepicker("hide");*/
213		}
214	}, 150);
215});
216
217/* ------------------------------------------------------ */
218/* リサイズ後の処理 */
219/* ------------------------------------------------------ */
220var timer = false;
221var prewidth = $(window).width();
222
223$(window).resize(function() {
224	if (timer !== false) {
225			clearTimeout(timer);
226	}
227	timer = setTimeout(function() {
228			var nowWidth = $(window).width()
229			if(prewidth !== nowWidth){
230				$("header .menu-btn").removeClass("active");
231				$("header #gnav .menu").removeAttr("style");
232			}
233			prewidth = nowWidth;
234	}, 100);
235});
236
237/* ------------------------------------------------------ */
238/* 電話番号のリンク */
239/* ------------------------------------------------------ */
240$(function(){
241	if (!isMobile) {
242	    $('a[href^="tel:"]').on('click', function(e){
243	        e.preventDefault();
244	    });
245	}
246});
247
248/* ------------------------------------------------------ */
249/* 画像リンク */
250/* ------------------------------------------------------ */
251$(function(){
252//	$("a").fadeTo(1,1.0).hover(function(){
253	$("a").hover(function(){
254		$(this).find("img").stop().fadeTo(100, 0.7);
255	},function(){
256		$(this).find("img").stop().fadeTo(200, 1.0);
257	});
258});
259
260/* ------------------------------------------------------ */
261/* load(CLS対策) */
262/* ------------------------------------------------------ */
263$(window).on("load",function(){
264	$("body").addClass("load");
265});
266
267
268/* ------------------------------------------------------ */
269/* アコーディオン */
270/* ------------------------------------------------------ */
271$(function(){
272	$('.accordion-header').click(function() {
273		$(this).next().slideToggle();
274		$(this).toggleClass('active');
275	});
276});
277
278
279$(".toggle-btn").on("click", function() {
280	$(this).next().slideToggle();
281	$(this).toggleClass("active");
282});
283
284
285/*jQuery(function($){
286    $('.slider').slick({
287
288	infinite: true,
289	slidesToShow: 3,
290	slidesToScroll: 3,
291    responsive:[
292        {
293            breakpoint: 1024,
294            settings:{
295                slidesToShow:3,
296            }
297        },
298        {
299            breakpoint: 768,
300            settings:{
301                slidesToShow:2,
302            }
303        },]
304});
305
306$('.slider-for01').slick({
307  slidesToShow: 1,
308  slidesToScroll: 1,
309  arrows: false,
310  fade: true,
311  asNavFor: '.slider-nav01'
312});
313$('.slider-nav01').slick({
314   slidesToShow: 4,
315  slidesToScroll: 4,
316  asNavFor: '.slider-for01',
317  dots: false,
318  centerMode: true,
319  focusOnSelect: true
320});
321
322$('.slider-for02').slick({
323  slidesToShow: 1,
324  slidesToScroll: 1,
325  arrows: false,
326  fade: true,
327  asNavFor: '.slider-nav02'
328});
329$('.slider-nav02').slick({
330   slidesToShow: 4,
331  slidesToScroll: 4,
332  asNavFor: '.slider-for02',
333  dots: false,
334  centerMode: true,
335  focusOnSelect: true
336});*/

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.