PageSourceSearch

https://ronherman.jp/assets/front/js/shop.js?1749615344

js ronherman.jp collected 2026-10-03 21:20:13 UTC 2,711 bytes, 103 lines download raw bytes

1var $store = $('.store-slider-list-wrapper');
2var $store_layer = $('.store-detail-layer');
3var $shop_id = 0;
4
5$(document).ready(function() {
6	// ショップ選択
7	$(".store-list-detail__image-link").bind("click", function (e) {
8		// 読み込み中はモーダルを表示しない
9		return false;
10	});
11
12	// スライダー作成後
13	$('.store-slider-list').on('init', function(slick) {
14		// モーダル表示位置を取得
15		var height = $store.height();
16		$store.css('position', 'fixed');
17		$store.css('top', 'calc(50% - (' + height + 'px / 2))');
18		if ($(window).height() < height) {
19			$store.addClass('contents-scroll');
20		}
21		// モーダルを表示
22		$store.show();
23	});
24
25	// 閉じるボタン・レイヤー押下
26	$(".store-detail__close-button, .store-detail-layer").bind("click", function (e) {
27		$store.hide();
28		$store_layer.hide();
29		$('body').removeClass('store-active');
30		$store.removeClass('contents-scroll');
31		return false;
32	});
33});
34
35$(window).load(function() {
36	// ショップ選択
37	$(".store-list-detail__image-link").bind("click", function () {
38		$shop_id = $(this).attr("data-shop-id");
39		var $store_slider = $('#shop-id-' + $shop_id + ' .store-slider-list');
40
41		// レイヤーを表示
42		if (640 < $(window).width()) {
43			$('.store-detail-layer').show();
44		}
45
46		// 対象のショップを表示
47		$('[id^="shop-id-"]').hide();
48		$('#shop-id-' + $shop_id).show();
49
50		// スライダー生成
51		$store_slider.slick({
52			infinite: true,
53			dots: true
54		});
55
56		// マップ生成
57		initTargetMap($shop_id);
58		$('#store-map-' + $shop_id).attr('data-map', 1);
59
60		// スライドを先頭に移動
61		$store_slider.slick('slickGoTo', 0, true);
62		$store_slider.slick('setPosition');
63
64		$('body').addClass('store-active');
65
66		return false;
67	});
68});
69
70function initTargetMap(shopId) {
71	var shop = shopList[shopId];
72
73	if (shop === undefined || $('#store-map-' + shopId).attr('data-map') == 1) {
74		return false;
75	}
76
77	var latlng = new google.maps.LatLng(shop["latitude"], shop["longitude"]);
78	var map = new google.maps.Map(document.getElementById('store-map-' + shopId), {
79		zoom: 16,
80		center: latlng,
81		disableDefaultUI: true
82	});
83	var marker = new google.maps.Marker({
84		position: latlng,
85		map: map
86	});
87	var mapStyle = [ {
88		"stylers": [ {
89			"saturation": -100
90		} ]
91	} ];
92	var mapType = new google.maps.StyledMapType(mapStyle);
93	map.mapTypes.set('GrayScaleMap', mapType);
94	map.setMapTypeId('GrayScaleMap');
95}
96$(function () {
97	if (location.hash !== "") {
98		var location_hash = location.hash;
99		var hash = location_hash.match(/#.+/);
100		hash = hash[0];
101		$("html,body").animate({scrollTop: $(hash).offset().top - $('.header').innerHeight() - ($(window).width() > 640 ? 70 : 30)});
102	}
103});

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.