PageSourceSearch

https://ni-consul.co.jp/common2/js/local.js

js ni-consul.co.jp collected 2026-10-02 17:28:24 UTC 9,200 bytes, 345 lines download raw bytes

1//viewport設定
2$(function(){
3    var ua = navigator.userAgent;
4    if((ua.indexOf('iPhone') > 0) || ua.indexOf('iPod') > 0 || (ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0)){
5       //スマホの場合
6    } else {
7		//タブレットの場合
8        $('meta[name="viewport"]').attr({
9			content: "width=1400"
10		});
11    }
12});
13//ipad
14(function($){
15	var ipad = (/ipad/i.test(navigator.userAgent.toLowerCase()));
16	if(ipad){
17		$('meta[name="viewport"]').attr({
18			content: "width=1400"
19		});
20	}
21})(jQuery);
22
23
24/*スマホ時に電話リンク有効・画像に適用*/
25$(function(){
26    var ua = navigator.userAgent;
27    if(ua.indexOf('iPhone') > 0 && ua.indexOf('iPod') == -1 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0 && ua.indexOf('SC-01C') == -1 && ua.indexOf('A1_07') == -1 ){
28        $('.tel img').each(function(){
29            var alt = $(this).attr('alt');
30            $(this).wrap($('<a>').attr('href', 'tel:' + alt.replace(/-/g, '')));
31        });
32    }
33});
34
35
36
37/*アイテム高さ*/
38$(function(){
39  $('.c-item').matchHeight();
40  $('.item .txtbox').matchHeight();
41  $('.h-set .txtbox').matchHeight();
42  $('.c-item-list01 .txtbox').matchHeight();
43});
44
45
46
47
48// 順番に出現アニメーション(下から移動)※1ページ1グループのみ
49
50$(window).on('load', function() {
51    var setElm = $('.fadeinNum'),
52    delayHeight = 20;
53	var w = $(window).width();
54		var x = 640;
55		if (w <= x) {
56			$(window).on('scroll resize',function(){
57				 setElm.each(function(i){
58					var setThis = $(this),
59					elmTop = setThis.offset().top,
60					elmHeight = setThis.height(),
61					scrTop = $(window).scrollTop(),
62					winHeight = $(window).height();
63					if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
64						
65						setThis.stop().delay(200*i).queue(function() {
66							setClassInterval(0,'.fadeinNum', 'scrollin', 200);
67						});
68			
69					} else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
70						
71					}
72				
73				});
74			});
75		} else {
76			$(window).on('scroll resize',function(){
77				 setElm.each(function(i){
78					var setThis = $(this),
79					elmTop = setThis.offset().top,
80					elmHeight = setThis.height(),
81					scrTop = $(window).scrollTop(),
82					winHeight = $(window).height();
83					if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
84						
85						setThis.stop().delay(200*i).queue(function() {
86							setClassInterval(0,'.fadeinNum', 'scrollin', 200);
87						});
88			
89						
90					} else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
91						
92					}
93				
94				});
95			});
96		}
97	
98});
99
100
101
102// 順番に出現アニメーション(移動なし)※1ページ1グループのみ
103
104$(window).on('load', function() {
105    var setElm = $('.fadeNum'),
106    delayHeight = 20;
107	var w = $(window).width();
108		var x = 640;
109		if (w <= x) {
110			$(window).on('scroll resize',function(){
111				 setElm.each(function(i){
112					var setThis = $(this),
113					elmTop = setThis.offset().top,
114					elmHeight = setThis.height(),
115					scrTop = $(window).scrollTop(),
116					winHeight = $(window).height();
117					if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
118						
119						setThis.stop().delay(200*i).queue(function() {
120							setClassInterval(0,'.fadeNum', 'scrollin', 200);
121						});
122			
123					} else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
124						
125					}
126				
127				});
128			});
129		} else {
130			$(window).on('scroll resize',function(){
131				 setElm.each(function(i){
132					var setThis = $(this),
133					elmTop = setThis.offset().top,
134					elmHeight = setThis.height(),
135					scrTop = $(window).scrollTop(),
136					winHeight = $(window).height();
137					if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
138						
139						setThis.stop().delay(200*i).queue(function() {
140							setClassInterval(0,'.fadeNum', 'scrollin', 200);
141						});
142			
143						
144					} else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
145						
146					}
147				
148				});
149			});
150		}
151	
152});
153
154
155
156//コンテンツフェードイン01(下から移動)
157
158$(window).on('load', function() {
159    var setElm = $('.fadein'),
160    delayHeight = 150;
161    $(window).on('load scroll resize',function(){
162		 setElm.each(function(i){
163            var setThis = $(this),
164            elmTop = setThis.offset().top,
165            elmHeight = setThis.height(),
166            scrTop = $(window).scrollTop(),
167            winHeight = $(window).height();
168            if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
169				
170				setThis.stop().delay(120*i).queue(function() {
171					setThis.addClass('scrollin').dequeue();
172				});
173		
174				
175            } else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
176              	
177            }
178		
179        });
180    });
181});
182
183
184
185//コンテンツフェードイン02 縦移動なし
186
187$(window).on('load', function() {
188    var setElm = $('.fade'),
189    delayHeight = 150;
190    $(window).on('load scroll resize',function(){
191		 setElm.each(function(i){
192            var setThis = $(this),
193            elmTop = setThis.offset().top,
194            elmHeight = setThis.height(),
195            scrTop = $(window).scrollTop(),
196            winHeight = $(window).height();
197            if (scrTop > elmTop - winHeight + delayHeight && scrTop < elmTop + elmHeight){
198				
199				setThis.stop().delay(120*i).queue(function() {
200					setThis.addClass('scrollin').dequeue();
201				});
202		
203				
204            } else if (scrTop < elmTop - winHeight + delayHeight && scrTop < elmTop + delayHeight){
205              	
206            }
207		
208        });
209    });
210});
211
212
213
214//コンテンツフェードロード時
215$(window).on('load', function() {
216	var setElm = $('.fadeinNum'),
217    delayHeight = 60;
218	setElm.each(function(i){
219            var setThis = $(this),
220            elmTop = setThis.offset().top,
221            elmHeight = setThis.height(),
222            scrTop = $(window).scrollTop(),
223            winHeight = $(window).height();
224            if (elmTop<winHeight+scrTop){
225				setThis.stop().delay(200*i).queue(function() {
226						setThis.addClass('scrollin').dequeue();
227				});
228				
229            }
230        });
231});
232
233$(window).on('load', function() {
234	var setElm = $('.fadeNum'),
235    delayHeight = 60;
236	setElm.each(function(i){
237            var setThis = $(this),
238            elmTop = setThis.offset().top,
239            elmHeight = setThis.height(),
240            scrTop = $(window).scrollTop(),
241            winHeight = $(window).height();
242            if (elmTop<winHeight+scrTop){
243				setThis.stop().delay(200*i).queue(function() {
244						setThis.addClass('scrollin').dequeue();
245				});
246				
247            }
248        });
249});
250
251$(window).on('load', function() {
252	var setElm = $('.fadein'),
253    delayHeight = 60;
254	setElm.each(function(i){
255            var setThis = $(this),
256            elmTop = setThis.offset().top,
257            elmHeight = setThis.height(),
258            scrTop = $(window).scrollTop(),
259            winHeight = $(window).height();
260            if (elmTop<winHeight+scrTop){
261				setThis.stop().delay(120*i).queue(function() {
262						setThis.addClass('scrollin').dequeue();
263				});
264				
265            }
266        });
267});
268
269$(window).on('load', function() {
270	var setElm = $('.fade'),
271    delayHeight = 60;
272	setElm.each(function(i){
273            var setThis = $(this),
274            elmTop = setThis.offset().top,
275            elmHeight = setThis.height(),
276            scrTop = $(window).scrollTop(),
277            winHeight = $(window).height();
278            if (elmTop<winHeight+scrTop){
279				setThis.stop().delay(120*i).queue(function() {
280						setThis.addClass('scrollin').dequeue();
281				});
282				
283            }
284        });
285});
286
287/*
288var num = 0;
289$(function(){
290    $(window).scroll(function (){
291		var $load_num = ++num;
292        $('.fadein').each(function(){
293            var elemPos = $(this).offset().top;
294            var scroll = $(window).scrollTop();
295            var windowHeight = $(window).height();
296            if (scroll > elemPos - windowHeight + windowHeight/5){
297                setClassInterval($load_num*3,'.fadein', 'scrollin', 100);
298            }
299        });
300    });
301});
302*/
303
304function setClassInterval(count,selecter, add_class, speed, time_out){
305  var targets = $(selecter);
306  if(targets.length == 0) return false;
307
308  if(time_out){
309    setTimeout(function(){
310      setClassInterval(selecter, add_class, speed)
311    }, time_out);
312    return false;
313  }
314
315  //setting
316  var length = targets.length;
317  var ivl_count = count;
318
319  //first set
320  targets.eq(ivl_count).addClass(add_class);
321  if(length <= ++ivl_count) return true;
322
323  //interval
324  var ivl_id = setInterval(function(){
325    targets.eq(ivl_count).addClass(add_class);
326    if(length <= ++ivl_count) clearInterval(ivl_id);
327  }, speed);
328}
329
330
331$(function(){
332    if(location.href.match(/staging\.yomisen/)){
333        $("<div />",{html:"staging",css:{position:"fixed",top:0,left:0,background:"#5CB800",color:"white",fontSize:"11px",padding:"3px",zIndex:99999}}).appendTo("body");
334    }
335})
336
337/* Put Current Year */
338function addCrtYear()
339{
340	var dtToday = new Date;
341	var strYear;
342
343	strYear = dtToday.getFullYear();
344	document.write('1998-'+strYear);
345}

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.