PageSourceSearch

https://www.starcat.co.jp/company/js/common.js

js starcat.co.jp collected 2026-10-02 07:07:02 UTC 2,814 bytes, 105 lines download raw bytes

1
2
3$(function(){
4		
5	/* アコーディオン
6	--------------------------------- */
7	$(".list_btn").on("click", function(){
8		$(this).toggleClass('open');
9		$(this).next('.level2').slideToggle();
10	});
11	
12	
13	/* ドロップダウンメニュー(ヘッダー)
14	----------------------------- */
15	$('.dropdown-menu').hover(function() {
16			if(!checkPc()){
17				//スマホ・タブレットの場合、処理しない
18				return;
19			}
20        $(this).find(".dropdown-contents").addClass('dropdown-show');
21      },
22      function() {
23        $(this).find(".dropdown-contents").removeClass('dropdown-show');
24      }
25    );
26    $('.dropdown-menu > a').click(function(e) {
27			if(!checkPc()){
28				//スマホ・タブレットの場合、リンク処理をキャンセル
29				e.preventDefault();
30			}else{
31				return;
32			}
33      if ($(this).next(".dropdown-contents").hasClass("dropdown-show")) {
34        $(this).next(".dropdown-contents").removeClass("dropdown-show");
35      } else {
36        $(this).next(".dropdown-contents").addClass("dropdown-show")
37					.parent(".dropdown-menu").siblings().find(".dropdown-contents").removeClass("dropdown-show");
38      }
39    });
40	
41	//デバイスがPCかどうかチェック
42	function checkPc(){
43		var ua = navigator.userAgent;
44		if(ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0){
45			//sp
46			return false;
47		}else if(ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0){
48			//tabsp
49			return false;
50		}else{
51			//pc
52			return true;
53		}
54	}
55	
56	
57	/* ドロワーのリンクをクリックしたら閉じる
58	-----------------------------------------*/
59	/* ----var inst = $('[data-remodal-id=modal]').remodal();
60	$('.drawer_content a').click(function(){
61		inst.close();
62	});----*/
63		
64		
65	/* ページ内リンクをスムーズにスクロール
66	--------------------------------- */
67	$('a[href^="#"]').click(function(){
68		var adjust = 0;
69		var speed = 400;
70		var href= $(this).attr("href");
71		var target = $(href == "#" || href == "" ? 'html' : href);
72		var position = target.offset().top + adjust;
73		$('body,html').animate({scrollTop:position}, speed, 'swing');
74		return false;
75	});
76	
77	
78	/* matchHeight
79	--------------------------------- */
80	$('.matchheight,.matchheight2').matchHeight();
81	
82	
83	/* スクロールアニメーション、fadeup
84	-----------------------------------------*/
85	
86	$(window).on("resize scroll", function () {
87		scrollAnimetion();
88	});
89
90	function scrollAnimetion(){
91		var st = $(window).scrollTop();
92		var wh = window.innerHeight;
93		
94		$(".js_fadeup").each(function () {
95			var tg = $(this).offset().top - wh * 0.9;
96			if (st > tg) {
97				$(this).addClass("scrollin");
98			}
99		});
100	}
101	
102});
103
104
105

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.