PageSourceSearch

https://toyotetsu.com/assets/js/service.js?v=20260925000002

js toyotetsu.com collected 2026-09-24 22:15:28 UTC 4,099 bytes, 130 lines download raw bytes

1jQuery(function(){
2
3	/* -------------------------- */
4	/* タブ切り替え */
5	/* -------------------------- */
6	let tabItem = jQuery(".tab_selector_item");
7
8	jQuery(".tab_selector_item").on("click", function() {
9		const index = tabItem.index(this);
10		jQuery(".tab_selector_item.current").removeClass("current");
11		jQuery(this).addClass("current");
12		jQuery(".tab_contents_item").removeClass("show").eq(index).addClass("show");
13	});
14
15
16	/* -------------------------- */
17	/* モーダル */
18	/* -------------------------- */
19	// グッズ販売
20	let goodModal = '#service-goods .modal';
21	let goodModalOpen = '#service-goods .-trigger';
22	let goodModalClose = '#service-goods .modal .close';
23	let goodModalBg = '#service-goods .modal .modal_bg';
24	jQuery(goodModalOpen).on('click',function() {
25		jQuery(this).next(goodModal).fadeIn();
26	});
27	jQuery(goodModalClose).on('click',function() {
28		jQuery(goodModal).fadeOut();
29	});
30	jQuery(goodModalBg).on('click',function() {
31		jQuery(this).parent(goodModal).fadeOut();
32	});
33
34	// レンタルスペース
35	let rentalspaceModal = '#service-rentalspace .modal';
36	let rentalspaceModalOpen = '#service-rentalspace .-trigger';
37	let rentalspaceModalClose = '#service-rentalspace .modal .close';
38	let rentalspaceModalBg = '#service-rentalspace .modal .modal_bg';
39	jQuery(rentalspaceModalOpen).on('click',function() {
40		jQuery(this).parent('.btn_area').next(rentalspaceModal).fadeIn();
41	});
42	jQuery(rentalspaceModalClose).on('click',function() {
43		jQuery(rentalspaceModal).fadeOut();
44	});
45	jQuery(rentalspaceModalBg).on('click',function() {
46		jQuery(this).parent(rentalspaceModal).fadeOut();
47	});
48
49	// ロケーションサービス
50	let locationModal = '#service-location-place .modal';
51	let locationModalOpen = '#service-location-place .-trigger';
52	let locationModalClose = '#service-location-place .modal .close';
53	let locationModalBg = '#service-location-place .modal .modal_bg';
54	jQuery(locationModalOpen).on('click',function() {
55		jQuery(this).next(locationModal).fadeIn();
56	});
57	jQuery(locationModalClose).on('click',function() {
58		jQuery(locationModal).fadeOut();
59	});
60	jQuery(locationModalBg).on('click',function() {
61		jQuery(this).parent(locationModal).fadeOut();
62	});
63
64
65	/* -------------------------- */
66	/* アコーディオン */
67	/* -------------------------- */
68	// 交通広告
69	jQuery('#service-ad-faq .faq_contents .-ac_trigger').on('click', function() {
70		jQuery(this).toggleClass('-active');
71		jQuery(this).next('.ac_contents').slideToggle(300);
72	});
73	// ロケーションサービス
74	jQuery('#service-location-faq .faq_contents .-ac_trigger').on('click', function() {
75		jQuery(this).toggleClass('-active');
76		jQuery(this).next('.ac_contents').slideToggle(300);
77	});
78	jQuery('#service-location-works .-ac_trigger').on('click', function() {
79		jQuery(this).toggleClass('-active');
80		jQuery(this).next('.ac_contents').slideToggle(300);
81	});
82
83
84
85	/* -------------------------- */
86	/* Swiper */
87	/* -------------------------- */
88	// グッズ販売・不動産
89	// const swiperGalleryThumb = new Swiper(".thumbnail.swiper", {
90	// 	slidesPerView: 'auto',
91	// });
92	// const swiperGallery = new Swiper('.gallery.swiper', {
93	// 	loop: true,
94	// 	// effect: 'fade',
95	// 	// speed: 1000,
96	// 	slidesPerView: 1,
97	// 	// allowTouchMove: false,
98	// 	thumbs: {
99	// 		swiper: swiperGalleryThumb,
100	// 	},
101	// });
102
103	jQuery('.gallery_wrap').each(function(){
104		var $wrap    = jQuery(this);
105		var $mainEl  = $wrap.find('.gallery.swiper');
106		var $thumbEl = $wrap.find('.thumbnail.swiper');
107
108		// main が無ければスキップ
109		if ($mainEl.length === 0) return;
110
111		// サムネイル初期化(あれば)
112		var thumbSwiper = null;
113		if ($thumbEl.length) {
114			if ($thumbEl[0].swiper) $thumbEl[0].swiper.destroy(true, true);
115			thumbSwiper = new Swiper($thumbEl[0], {
116				slidesPerView: 'auto'
117			});
118		}
119
120		// メイン初期化
121		if ($mainEl[0].swiper) $mainEl[0].swiper.destroy(true, true);
122		new Swiper($mainEl[0], {
123			loop: true,
124			slidesPerView: 1,
125			// allowTouchMove: false,
126			thumbs: thumbSwiper ? { swiper: thumbSwiper } : undefined
127		});
128	});
129
130});

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.