PageSourceSearch

https://bartender-anime.com/assets/js/jquery.common.js?240508

js bartender-anime.com collected 2026-10-02 05:52:40 UTC 4,069 bytes, 150 lines download raw bytes

1/*-----------------------------------------------
2 * Root
3-------------------------------------------------*/
4var root = $("body").data('root');
5var page = $("body").data('page');
6
7
8/*-----------------------------------------------
9 * COMMON
10-------------------------------------------------*/
11$(function(){
12
13	// Anchor Smooth Scroll
14	$('.js-anchor').on('click', function(){
15		var speed = 1000;
16		var href= $(this).attr("href");
17		var target = $(href == "#" || href == "" ? 'html' : href);
18		var position = target.offset().top;
19		$('body,html').animate({scrollTop:position}, speed, 'easeOutQuart');
20		return false;
21	});
22
23	// Menu
24	$('.js-menu').on('click', function(){
25		$(this).toggleClass('is-active');
26		
27		if($(this).hasClass('is-active')){
28			$('.js-header').addClass('is-active');
29			$('.header__navBtnWrap-sticky').addClass('is-active');
30		} else {
31			$('.js-header').removeClass('is-active');
32			$('.header__navBtnWrap-sticky').removeClass('is-active');
33		}
34	});
35
36	$('.headerNavLists__item a').on('click', function (){
37		$('.js-header').removeClass('is-active');
38		$('.js-menu').removeClass('is-active');
39		$('.header__navBtnWrap-sticky').removeClass('is-active');
40	  });
41
42
43	/**
44	 * Modal open
45	 */
46	// Common
47	$('.js-modalOpen').on('click', function(){
48		var modalID = $(this).data('modal');
49		$('#' + modalID).fadeIn(500);
50		$('.modalBox').fadeIn(500);
51		$('body').css({'overflow':'hidden'});
52	});
53
54	// Youtube
55	$('.js-youtubePlay').on('click', function(){
56		var ytID = $(this).data('ytid');
57		var ytURL = 'https://www.youtube.com/embed/'+ytID+'?autoplay=1&rel=0';
58		setTimeout(function(){
59			$('.js-youtubeIframe').attr('src',ytURL);
60		},100);
61	});
62
63
64	/**
65	 * Modal close
66	 * iframeのsrcをcloseの際に消す
67	 */
68	var $modalIF = $('.js-youtubeIframe');
69
70	// Close処理
71	function modalClose() {
72		$('.modalBox, .oneModal').fadeOut(500);
73		setTimeout(function(){
74			$modalIF.attr('src','');
75		},500);
76		$('body').css({'overflow':''});
77	}
78
79	// Closeボタン
80	$('.js-modalClose').on('click', function(){
81		modalClose();
82	});
83
84	// Close エリア外
85	$('.js-oneModalIn').on('click touchend', function(e) {
86		if (!$(e.target).closest('.js-oneModalIn__cont').length) {
87			modalClose();
88		}
89	});
90
91	// アクセス時自動モーダル
92	if($("#test")[0]){
93	$("#test").click()
94}
95
96
97});
98
99
100/*-----------------------------------------------
101 * ACCESS HISTORY [セッションストレージを使用して初回アクセスか判定するやつ]
102----------------------------------------------- */
103function accessHistory() {
104	const keyName = 'visited';
105	const keyValue = true;
106	if (!sessionStorage.getItem(keyName)) {
107		//FIRST ACCESS
108		sessionStorage.setItem(keyName, keyValue);
109		return true;
110	} else {
111		$('body').addClass('is-visited'); 
112		return false;
113	}
114}
115$(document).ready(accessHistory());
116
117
118/*-----------------------------------------------
119 * ScrollAnimation for IntersectionObserver [.js-scrani 要素が見えたら is-ani をaddclass するやつ]
120-------------------------------------------------*/
121const set_scrani = () =>{
122	const SCRANI_ACTIVE_CLASSNAME = 'is-ani';
123	const scrani_callback = (entries) => {
124		//各 entry(IntersectionObserverEntry オブジェクト)に対して
125		entries.forEach( (entry) => {
126			//監視対象の要素が領域内に入った場合の処理
127			if (entry.isIntersecting) {
128				//監視対象の要素(entry.target)に is-ani クラスを追加
129				entry.target.classList.add(SCRANI_ACTIVE_CLASSNAME);
130			}
131		});
132	}
133	const scrani_option = {
134		rootMargin: '-30% 0px',
135	}
136	const scrani_observer = new IntersectionObserver(scrani_callback, scrani_option);
137
138	const target_scrani = document.querySelectorAll('.js-scrani');
139	//全ての監視対象要素を observe() メソッドに指定
140	target_scrani.forEach( (elem) => {
141		//observe() に監視対象の要素を指定
142		scrani_observer.observe(elem);
143	});
144}
145
146	setTimeout(function(){
147		set_scrani();
148	},200);
149
150	

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.