PageSourceSearch

https://www.city.morioka.iwate.jp/_template_/_site_/_default_/_res/js/slider.js

js city.morioka.iwate.jp collected 2026-09-24 19:12:54 UTC 3,485 bytes, 109 lines download raw bytes

1//------------------------------------------------------------------------------
2//	Copyright (C) 2018 FUTUREINN CO., LTD. All Rights Reserved.
3//------------------------------------------------------------------------------
4//------------------------------------------------------------------------------
5//カルーセル 3.0.0
6(function(){
7	var $ = FI.jQuery;
8	$(function() {
9		var $slider = $( ".bxslider" );
10
11
12	
13	$(function(){
14		
15		//------------------------------------------------------------------------
16		//初期値
17		//------------------------------------------------------------------------
18		var path = $('#cmncss').attr('href');
19		if($('#wrap').hasClass('smpmode')){
20			var path = FI.smpcss;
21		}
22		var csspath = path.substring(0, path.lastIndexOf('/'));
23
24		var slider;					//スライドする領域
25		var bt_hide_flg;			//<>ボタンを非表示にする処理を有効にするか
26		var pc_flg;					//PCで実行するか
27		var smp_flg;				//スマホで実行するか
28		var length_flg;				//件数を表示するか
29		var slideroption;			//スライダーオプション
30		
31		//------------------------------------------------------------------------
32		//スライダー設定
33		//------------------------------------------------------------------------
34		//プロローグ:全面カルーセル
35		slider = '#slider1';
36		bt_hide_flg = true;
37		pc_flg = true;
38		smp_flg = true;
39		length_flg = false;
40		var slideroption = {
41			auto: true,
42			pause:  7000,
43			speed: 1500,
44			mode: 'fade',
45			autoControls: true,
46			startText: '再生',
47			stopText: '停止',
48			controls: false,
49			autoControlsCombine: true
50		}
51		bxSlider(slider,bt_hide_flg,pc_flg,smp_flg,length_flg,slideroption)
52
53		//------------------------------------------------------------------------
54		//スライダー処理
55		//------------------------------------------------------------------------
56		function bxSlider(slider,bt_hide_flg,pc_flg,smp_flg,length_flg,slideroption){
57			var $tmenu = $(slider);			//スライドの領域
58			var tmulwidth = 0; 				//スライドの中身の横幅
59			var isAct = true;  				//スライド機能を有効とするかどうか
60			var itemlength = $(slider + ' ul li').length - $(slider + ' ul li.bx-clone').length;
61			
62			//--------------------------------------------------------------------
63			//スライド実行
64			judgeSlide()
65			if(isAct){
66				$(slider + ' ul').bxSlider(slideroption);
67				//件数表示
68				if(length_flg){
69					$(slider).prepend('<p class="itemlength">現在、'+itemlength+'件のコンテンツが掲載されています。</p>');
70				}
71			}
72			
73			//--------------------------------------------------------------------
74			//スライド有効判定
75			function judgeSlide(){
76				//子要素の幅を取得
77				$(slider + ' ul').children('li').each(function(){
78					tmulwidth = tmulwidth + $(this).outerWidth(true);
79				});
80				tmulwidth = tmulwidth - slideroption['slideMargin'];
81				
82				if(tmulwidth <= $tmenu.width()){
83					//全部見えている場合:オフ
84					isAct = false;
85					$(slider + ' ul li:last-child').css('margin-right',0);
86				}else if($('#wrap').hasClass('smpmode')){
87					//スマホ
88					if(smp_flg){
89						isAct = true;
90					}else{
91						isAct = false;
92					}
93				}else{
94					//PC
95					if(pc_flg){
96						isAct = true;
97					}else{
98						isAct = false;
99					}
100				}
101			}
102		}
103	});
104
105
106
107
108	});
109})();

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.