PageSourceSearch

https://cf.mora.jp/cfdocs/pc/js/scroller2.js?ver=20260918131340

js mora.jp collected 2026-09-24 09:03:47 UTC 7,031 bytes, 211 lines download raw bytes

1(function($) {
2
3/* img透過処理 */
4$(function() {
5	var msie = navigator.appVersion.toLowerCase();
6	if (msie > 8) {
7	} else {
8		if (navigator.userAgent.indexOf("MSIE") != -1) {
9			$('#prev').each(function() {
10				$(this).css({
11					'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../img/btn_prev.png", sizingMethod="scale") alpha(opacity=20);'
12				});
13			});
14			
15			$('#next').each(function() {
16				$(this).css({
17					'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../img/btn_next.png", sizingMethod="scale") alpha(opacity=20);'
18				});
19			});
20			
21			//$('#prev:hover').each(function() {
22			//	$(this).css({
23			//		'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../img/btn_prev.png", sizingMethod="scale") alpha(opacity=80);'
24			//	});
25			//});
26			
27			//$('#next:hover').each(function() {
28			//	$(this).css({
29			//		'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../img/btn_next.png", sizingMethod="scale") alpha(opacity=80);'
30			//	});
31			//});
32	    }
33	}
34});
35
36$(function () {
37	// 変数定義
38	var mainImages    = $("#mainImages ul"),
39		navlist = $("#thumbnails ul"),
40		prev    = $("#prev"), 
41		next    = $("#next");
42	var autoSlide;
43
44	// マウスオーバー関数のよびだしとサムネopacity設定
45	navHover();
46	navFade();
47	$("#thumbnails ul li").not(".selected").css("opacity", "0.8");
48
49	// サムネクリック時の挙動
50	$(document).on("click", "#thumbnails ul li", function(){
51
52		var rell2 = $(this).children("img").attr("rel");
53		
54		// selectedの操作
55		$("#thumbnails ul li").removeClass("selected");
56		$(this).addClass("selected");
57		
58		// 自動スライドの一時停止と開始
59		clearInterval(autoSlide);
60		
61		autoSlideDo();
62		
63		// メインビジュアルフェード関数の実行
64		//一時停止(クリックしたサムネイル画像を大バナーで見せてから)
65		//setTimeout("nowidFade(rell2)", 2500);
66		//nowidFade(rell2);
67		setTimeout(navFade, 300);
68	});
69
70	// メインヴィジュアル マウスオーバー時の挙動 2015.1.13
71	//jQuery1_9_0("#mainImages").mouseenter(function(){
72	//	clearInterval(autoSlide); //一時停止
73	//}).mouseleave(function(){
74	//	autoSlideDo(); //再開
75	//});
76	
77	$(document).on("mouseenter", "div#mainImages, div#thumbnails", function () {
78		clearInterval(autoSlide); //一時停止
79	})
80	$(document).on("mouseleave", "div#mainImages, div#thumbnails", function () {
81		autoSlideDo(); //再開
82	})
83	
84	// nextとprevクリック時の挙動
85	next.on("click", function(){
86		prevNavi();
87		clearInterval(autoSlide);
88		autoSlideDo();
89	});
90	
91	prev.on("click", function(){
92		nextNavi();
93		clearInterval(autoSlide);
94		autoSlideDo();
95	});
96	
97	// サムネ時のマウスオーバー関数
98	function navHover() {
99		navlist.children("li").on({
100			'mouseenter':function(){
101				if ( !$(this).is(".selected") ) {
102					$(this).animate({"opacity":"1"}, 10, "easeInCubic");
103				}
104			},
105			'mouseleave':function(){
106				if ( !$(this).is(".selected") ) {
107					$(this).animate({"opacity":"0.8"}, 10, "easeInCubic");
108				}
109			}
110		});
111	}
112
113	// 3秒ごとにnextNavi関数の呼び出し
114	function autoSlideDo() {
115		autoSlide = setInterval(prevNavi, 3000);
116	}
117	
118	// このウィンドウにフォーカスを設定してsetinterval実行
119	$(window).trigger("focus");
120	autoSlideDo();
121	
122	// このウィンドウからフォーカスがはずれたらsetintervalをクリア
123	$(window).on("focus",function(){
124		clearInterval(autoSlide);
125		autoSlideDo();
126	}).on("blur",function(){
127		clearInterval(autoSlide);
128	});
129
130	// next方向に移動する関数
131	function nextNavi() {
132
133		var rell3 = $("#thumbnails ul li:last-child img").attr("rel");
134		rell3 = parseInt(rell3) - 3;
135
136		// 最後のサムネをprependして非表示分のcss調整
137		var last = $("#thumbnails ul li:last-child").html();
138		$("#thumbnails ul").prepend( "<li>" + last + "</li>");
139		$("#thumbnails ul li:first-child").css("margin-left", "-90px");
140		
141		// 最初のサムネをスライドさせる
142		$("#thumbnails ul li:first-child").animate({"margin-left": "0"}, 100, "easeInCubic", function(){
143			// selectedの操作
144			$("#thumbnails ul li").removeClass("selected");
145			$("#thumbnails ul li:last-child").remove();
146			$("#thumbnails ul li:first-child").addClass("selected");
147			navFade();
148			navHover();
149		});
150		
151		// メインビジュアルの切り替え実行
152		nowidFade(rell3);
153	}
154
155	// prev方向に移動する関数
156	function prevNavi() {
157
158		//var rell = $("#thumbnails ul li:first-child img").attr("rel");
159		//var rell = $("#thumbnails ul li:last-child img").attr("rel");
160		var rell = $("#thumbnails ul li:first-child img").attr("rel");
161		rell = parseInt(rell) - 2;
162		
163		// 最初のサムネをスライドさせて最後にappendする
164		//$("#thumbnails ul li:first-child").animate({"margin-left": "-168px","opacity":"1"}, 100, "easeInCubic", function(){
165		$("#thumbnails ul li:first-child").animate({"margin-left": "-121px","opacity":"1"}, 100, "easeInCubic", function(){
166			// selectedの操作
167			$("#thumbnails ul li").removeClass("selected");
168			var first = $("#thumbnails ul li:first-child").html();
169			$("#thumbnails ul li:first-child").remove();
170			$("#thumbnails ul").append( "<li>" + first + "</li>");
171			navFade();
172			navHover();
173		});
174		
175		// メインビジュアルの切り替え実行
176		nowidFade(rell);
177	}
178
179	// メインビジュアルの切り替え関数
180	function nowidFade(rell) {
181		// rellによってselectedの付与を切り替える
182		mainImages.children("li").removeClass("selected");
183		
184		//var li_count = $("#thumbnails ul li").length;
185		var li_count = parseInt($("#thumbnails ul li").length) - 1;
186		
187		if ( rell < 0 ) {
188		//	rell = li_count + rell;
189		}
190		
191		mainImages.children("li").eq(rell).addClass("selected");
192		
193		// 切り替えアニメーション
194		mainImages.children("li").not(".selected").animate({"opacity" : "0"}, 100, "easeInCubic");
195		mainImages.children("li.selected").animate({"opacity" : "1"}, 100, "easeInCubic");
196	}
197	
198	// サムネのアクティブ切り替え関数
199	function navFade() {
200		//$("#thumbnails ul li").not(".selected").animate({"width": "168px", "height": "56px", "top": "0","opacity":"0.8"}, 10, "easeOutQuart").children("img").animate({"width": "168px", "height": "56px"}, 10, "easeOutQuart");
201		
202		$("#thumbnails ul li").not(".selected").animate({"width": "122px", "height": "43px", "top": "0","opacity":"0.8"}, 10, "easeOutQuart").children("img").animate({"width": "122px", "height": "43px"}, 10, "easeOutQuart");
203		
204		$("#thumbnails ul li.selected").animate({"opacity":"1"}, 10, "easeInCubic");
205		
206		//$("#thumbnails ul li.selected").animate({"width": "168px", "top": "0", "height": "56px","opacity":"0.8"}, 10, "easeOutQuart").children("img").animate({"width": "168px", "height": "56px"}, 10, "easeOutQuart");
207		
208		$("#thumbnails ul li.selected").animate({"width": "122px", "top": "0", "height": "43px","opacity":"0.8"}, 10, "easeOutQuart").children("img").animate({"width": "122px", "height": "43px"}, 10, "easeOutQuart");
209	}
210});
211})(jQuery);

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.