PageSourceSearch

https://uminokyoto.jp/js/scriptCommon.js?200123

js uminokyoto.jp collected 2026-10-02 06:46:43 UTC 5,612 bytes, 223 lines download raw bytes

1
2$(function() {
3    $("#container").waypoint({
4      handler: function(direction) {
5				$("body:not(.noFixed)").toggleClass("fixed");
6			},
7			offset: '-100',
8    });
9});
10
11$(window).on('load',function(){
12var menu = $('#slideMenu'), // スライドインするメニューを指定
13	menuBtn = $('#globalNav h2'), // メニューボタンを指定
14	body = $(document.body),     
15	menuWidth = menu.outerWidth();                
16var isAnimate = false;
17
18	$('.autoH').removeAttr('style');
19
20	
21
22	 
23	 
24if($(window).width()<768){ //スマホサイズ
25
26
27
28	$('.spclm2').each(function(){
29		$(this).find('.autoH').autoHeight({column:2,clear:1,height : 'height',});
30	});
31	$('.spclm2').each(function(){
32		$(this).find('.autoH2').autoHeight({column:2,clear:1,height : 'height',});
33	});
34	$('.spclm2').each(function(){
35		$(this).find('h2').autoHeight({column:2,clear:1,height : 'height',});
36	});
37	$('.spclm2').each(function(){
38		$(this).find('.tagBox').autoHeight({column:2,clear:1,height : 'height',});
39	});
40
41	$('.featureList').find('.autoH').autoHeight();
42	
43	$('.bnrSubContImg').each(function(){
44		$(this).css('padding-top',$(this).prev('.bnrSubContTxt').height()+'px');
45	});
46	
47
48
49	 
50	// メニューボタンをクリックした時の動き
51	
52	menuBtn.on('click', function(){
53		if (isAnimate) {
54			return;
55	  	} else {
56	    	isAnimate = true;
57			if(body.hasClass('open')){  //開いているので閉じる 
58				menu.slideToggle(300);
59				menuBtn.removeClass('open');
60				body.removeClass('open');
61				
62			} else {         
63				menu.stop().slideToggle(300);  
64				menuBtn.addClass('open');
65				body.addClass('open');
66			}
67			menu.promise().done(function() {
68    			isAnimate = false;
69			});
70		}             
71	});
72	
73	$('#closeBtn').click(function(){
74		menuBtn.removeClass('open');
75		body.removeClass('open');
76		menu.slideToggle(300);
77	});
78	
79	
80}else{
81	$('.spToggleBox').show();
82	$('.spToggleBox').prev('.toggle').addClass('open');
83
84	isAnimate = false;
85	
86	$('body').removeClass('open');
87	$('body').removeAttr('style');
88
89	$('.clm2').each(function(){
90		$(this).find('.autoH').autoHeight({column:2,clear:1,height : 'height',});
91	});
92	$('.clm2').each(function(){
93		$(this).find('.autoH2').autoHeight({column:2,clear:1,height : 'height',});
94	});
95	
96	$('.clm3').each(function(){
97		$(this).find('.autoH').autoHeight({column:3,clear:1,height : 'height',});
98	});
99	$('.clm3').each(function(){
100		$(this).find('.autoH2').autoHeight({column:3,clear:1,height : 'height',});
101	});
102	
103	$('.clm4').each(function(){
104		$(this).find('.autoH').autoHeight({column:4,clear:1,height : 'height',});
105	});
106	$('.clm4').each(function(){
107		$(this).find('.autoH2').autoHeight({column:4,clear:1,height : 'height',});
108	});
109	
110	$('.clm5').each(function(){
111		$(this).find('.autoH').autoHeight({column:5,clear:1,height : 'height',});
112	});
113	$('.clm5').each(function(){
114		$(this).find('.autoH2').autoHeight({column:5,clear:1,height : 'height',});
115	});
116	
117	$('.clm6').each(function(){
118		$(this).find('.autoH').autoHeight({column:6,clear:1,height : 'height'});
119	});
120	$('.clm6').each(function(){
121		$(this).find('.autoH2').autoHeight({column:6,clear:1,height : 'height'});
122	});
123	
124}
125
126
127   });
128
129$(function(){
130
131	//トグル
132	$('.toggleBox').hide();
133	//toggleAreaに入っていないtoggle→他と連動しない
134	$('.toggle:not(.toggleArea .toggle)').click(function(){
135			$(this).next('.toggleBox').slideToggle();
136			$(this).toggleClass('open');
137	});
138	
139	//toggleAreaに入っているtoggle→一個開いたら他閉める
140	$('.toggleArea .toggle').click(function(){
141		if($(this).hasClass('open')){
142			$(this).next('.toggleBox').slideUp();
143			$(this).removeClass('open');
144		}else{
145			$(this).parent('.toggleArea').find('.toggle').removeClass('open');
146			$(this).parent('.toggleArea').find('.toggleBox').slideUp();
147			$(this).next('.toggleBox').slideDown();
148			$(this).addClass('open');
149		}
150	});
151	
152	
153	$('.toggle.open').next('.toggleBox').show();
154	
155	
156	
157	/* ---------- easing / page top / $ ---------- */
158	var $btn = $('#pageTop a');
159	var isHidden = true;
160	var scrSwt=0;
161
162	
163	// デフォルトは非表示
164	//$btn.hide();
165	
166	// ページスクロールアクション -------------------------------------------------- //	
167	$(window).scroll(function () {
168				
169		if( $(this).scrollTop() > 300 ) {//ページトップボタン
170			if( isHidden ) {
171				//$btn.stop(true,true).fadeIn();
172				//isHidden = false;
173			}
174		} else {
175			if( !isHidden ) {
176				//$btn.stop(true,true).fadeOut();
177				//isHidden = true;
178			}
179		}
180	});
181	
182	
183	
184	
185
186});
187
188/* ---------- ページ内リンク $ ---------- */
189$(function(){
190	$('a[href^="#"]').click(function(){
191		var speed = 500;
192		if(!$(this).hasClass('inline')){
193			var href= $(this).attr("href");
194			var target = $(href == "#" || href == "" ? 'html' : href);
195			var position = target.offset().top - 80;
196			$("html, body").animate({scrollTop:position}, speed, "swing");
197			return false;
198		}
199	});
200});
201
202//端末判別
203function ua(){			
204	var agent = navigator.userAgent;	
205	if((navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') == -1) || navigator.userAgent.indexOf('iPad') > 0){
206			return "tb";
207	}else if(agent.search(/iPhone/) != -1 || agent.search(/iPod/) != -1 || agent.search(/Android/) != -1){
208			return "mobile";
209	}else{
210			return "pc";
211	}
212}
213
214
215	
216/* ---------- 言語切替 $ ---------- */
217	
218function selectLang() {
219	var browser = document.langForm.language.value;
220	location.href = browser;
221
222		
223}

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.