PageSourceSearch

https://www.town-echizen.jp/js/scripts.js

js town-echizen.jp collected 2026-10-02 07:19:08 UTC 3,796 bytes, 202 lines download raw bytes

1
2/*init page*/
3var initPage = (function() {
4	/*parama*/
5	var Wgallery=510;
6	var Wgallery_item=120;
7	var Hgallery_item=160;
8	function init(){
9		detectBrowser();
10		events();
11		setupPlugin();
12		menuMobile();
13		menuMobileBottom();
14
15	}
16	/*====slider intro======*/
17	function resetW()
18	{
19		var w=$(window).width();
20		if(w<=640)
21		{
22			Wgallery=w-40;
23			Wgallery_item=w-495;
24			Hgallery_item=130;
25			$('.lof-slidecontent .sliders-wrapper').css('width',(w-40) );
26			$('.lof-slidecontent ul.sliders-wrap-inner li').css('width',(w-40) );
27			$('.lof-slidecontent ul.sliders-wrap-inner').css('width',(w-40)*5 );
28			$('.lof-slidecontent ul.navigator-wrap-inner li').css('width',(w-495) );
29			return Wgallery, Wgallery_item, Hgallery_item;
30		}
31	}
32	function events()
33	{
34		$('.btn_public.style02,.arrow_top p').click(function(e) {
35           	 $('html, body').animate({
36				scrollTop: 0
37			}, 800);
38        });
39		resetW();
40		responsive();
41		$(window).resize(function(e) {
42            resetW();
43			responsive();
44        });
45	}
46	function responsive()
47	{
48		var w=$(window).width();
49		var font=(w*13)/640;
50
51	}
52	function setupPlugin()
53	{
54
55
56		$(".fancybox-effects-a").fancybox({
57			helpers: {
58				title : {
59					type : 'outside'
60				},
61				overlay : {
62					speedOut : 0
63				}
64			}
65		});
66	}
67	function setMapGoogle()
68	{
69
70	}
71	function detectBrowser(){
72        $('body').addClass(BrowserDetect.browser+ ' '+'version'+BrowserDetect.version);
73    }
74	function menuMobile()
75	{
76		$('.icon_menu').click(function(e) {
77            if($(this).hasClass('active'))
78			{
79				$(this).removeClass('active');
80				$('.menu_mobile').fadeOut();
81			}
82			else {
83				$(this).addClass('active');
84				$('.menu_mobile').fadeIn();
85			}
86        });
87	}
88	function menuMobileBottom()
89	{
90		var w=$(window).width();
91		if(w<=640)
92		{
93			$( ".block_info .box01" ).click(function() {
94				$(this).children('ul.list_item').slideToggle(500);
95			});
96			$( ".tk_block_info .tk_box01" ).click(function() {
97				$(this).children('ul.list_item').slideToggle(500);
98			});
99		}
100	}
101
102	return {
103		init:init,
104		setupPlugin:setupPlugin
105	}
106})();
107$(document).ready( function() {
108	initPage.init();
109});
110
111
112
113//TOPページ グローバルナビ
114$(function() {
115	$('#gnav-home li a img.hoverwave')
116	.hover(
117		function(){
118			$(this).stop().animate({'marginTop':'-15px'},'normal');
119		},
120		function () {
121			$(this).stop().animate({'marginTop':'0px'},'normal');
122		}
123	);
124});
125
126
127// ページトップ表示
128$(document).ready(function() {
129	
130		//ウィンドウが『読込み』もしくは『ウィンドウサイズ変更』された時、関数『init』を実行
131		//$(window).bind("load resize", init);
132		
133		//下記の処理を関数『init』として定義する
134		function init(){
135		
136		//ウィンドウサイズ取得
137		var winW = $(window).width();
138		var topBtn = $('#pageTop');  
139		var minsW = 640;
140		
141		//条件分岐 W640
142		if(winW > minsW){
143			$('#pageTop').hide();
144			$(window).scroll(function(){
145				if ($(this).scrollTop() > 100) {
146					$('#pageTop').fadeIn();
147				} else {
148					$('#pageTop').fadeOut();
149				}
150			});
151	
152		
153		
154		}else if(winW < minsW){
155			
156			//pageTop
157			$('#pageTop').css({
158				'display': "none"
159			});
160			
161		}
162		}	
163		
164		// 「ページトップへ」をクリックした場合
165		$('#pageTop').click(function(){
166			// ページトップにスクロール
167			$('html,body').animate({
168				scrollTop: 0
169			}, 300);
170			return false;
171		});
172 
173
174});
175
176
177
178
179//ソーシャルボタン
180(function(w,d){
181	 w.___gcfg={lang:"ja"};
182	 var s,e = d.getElementsByTagName("script")[0],
183	 a=function(u,f){if(!d.getElementById(f)){s=d.createElement("script");
184	 s.src=u;if(f){s.id=f;}e.parentNode.insertBefore(s,e);}};
185	 a("//platform.twitter.com/widgets.js","twitter-wjs");
186	 a("//connect.facebook.net/ja_JP/all.js#xfbml=1","facebook-jssdk");
187})(this, document);
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

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.