PageSourceSearch

https://www.andersoneconomicgroup.com/wp-content/plugins/slider-fa…/assets/8/js/infiniteslidev2.js?ver=1.0.0

js andersoneconomicgroup.com collected 2026-10-02 05:34:09 UTC 5,152 bytes, 223 lines download raw bytes

vendor: 5,152 bytes, lines 1-223
1/*
2infiniteslide.js v2
3version: 2.0.1
4Author: T.Morimoto
5
6Copyright 2017, T.Morimoto
7* Free to use and abuse under the MIT license.
8* http://www.opensource.org/licenses/mit-license.php
9
10https://github.com/woodroots/infiniteslidev2
11*/
12
13(function($){
14	$( window ).on(
15		'load',
16		function() {
17			window.loaded = true;
18
19		}
20	);
21	$(
22		function(){
23			$.fn.infiniteslide = function(options){
24				// option
25				var settings = $.extend(
26					{
27						'speed': 100, // 速さ 単位はpx/秒です。
28						'direction': 'left', // up/down/left/rightから選択
29						'pauseonhover': true, // マウスオーバーでストップ
30						'responsive': false, // 子要素の幅を%で指定しているとき
31						'clone': 1
32					},
33					options
34				);
35
36				var setCss = function(obj,direction){
37					$( obj ).wrap( '<div class="infiniteslide_wrap"></div>' ).parent().css(
38						{
39							overflow: 'hidden'
40						}
41					);
42
43					if (direction == 'up' || direction == 'down') {
44						var d = 'column';
45					} else {
46						var d = 'row';
47					}
48
49					$( obj ).css(
50						{
51							display: 'flex',
52							flexWrap: 'nowrap',
53							alignItems: 'center',
54							'-ms-flex-align': 'center',
55							flexDirection: d
56						}
57					).children().css(
58						{
59							flex: 'none',
60							display: 'block'
61						}
62					);
63				}
64
65				var setClone = function(obj,clone){
66					var $clone = $( obj ).children().clone( true ).addClass( 'infiniteslide_clone' );
67					i          = 1;
68					while (i <= clone) {
69						$clone.clone( true ).appendTo( $( obj ) );
70						i++;
71					}
72				}
73
74				var getWidth  = function(obj){
75					w = 0;
76					$( obj ).children( ':not(.infiniteslide_clone)' ).each(
77						function(key,value){
78							w = w + $( this ).outerWidth( true );
79						}
80					);
81					return w;
82				}
83				var getHeight = function(obj){
84					h = 0;
85					$( obj ).children( ':not(.infiniteslide_clone)' ).each(
86						function(key,value){
87							h = h + $( this ).outerHeight( true );
88						}
89					);
90					return h;
91				}
92
93				var getSpeed = function(l,s){
94					return l / s;
95				}
96				var getNum   = function(obj,direction){
97					if (direction == 'up' || direction == 'down') {
98						var num = getHeight( obj );
99					} else {
100						var num = getWidth( obj );
101					}
102					return num;
103				}
104
105				var getTranslate = function(num,direction){
106					if (direction == 'up' || direction == 'down') {
107						var i = '0,-' + num + 'px,0';
108					} else {
109						var i = '-' + num + 'px,0,0';
110					}
111					return i;
112				}
113
114				var setAnim = function(obj,id,direction,speed){
115					var num = getNum( obj,direction );
116					if (direction == 'up' || direction == 'down') {
117						$( obj ).parent( '.infiniteslide_wrap' ).css(
118							{
119								height: num + 'px'
120							}
121						);
122					}
123					var i = getTranslate( num,direction );
124
125					$( obj ).attr( 'data-style','infiniteslide' + id );
126
127					var css = '@keyframes infiniteslide' + id + '{' +
128								'from {transform:translate3d(0,0,0);}' +
129								'to {transform:translate3d(' + i + ');}' +
130							'}';
131					$( '<style />' ).attr( 'id','infiniteslide' + id + '_style' )
132					.html( css )
133					.appendTo( 'head' );
134
135					if (direction == 'right' || direction == 'down') {
136						var reverse = ' reverse';
137					} else {
138						var reverse = '';
139					}
140
141					$( obj ).css(
142						{
143							animation: 'infiniteslide' + id + ' ' + getSpeed( num,speed ) + 's linear 0s infinite' + reverse
144						}
145					);
146				}
147				var setStop = function(obj){
148					$( obj ).on(
149						'mouseenter',
150						function(){
151							/* $('.descdiv').css({
152							visibility:'visible'
153
154							}); */
155							$( this ).css(
156								{
157									animationPlayState: 'paused'
158
159								}
160							);
161						}
162					).on(
163						'mouseleave',
164						function(){
165							/* $('.descdiv').css({
166							visibility:'hidden'
167
168							}); */
169							$( this ).css(
170								{
171									animationPlayState: 'running'
172								}
173							);
174						}
175					);
176				}
177
178				var setResponsive = function(obj,direction){
179					var num = getNum( obj,direction );
180					var i   = getTranslate( num,direction );
181					return i;
182				};
183
184				return this.each(
185					function(key,value){
186						var $this = $( this );
187						var num   = Date.now() + Math.floor( 10000 * Math.random() ).toString( 16 );
188						if (settings.pauseonhover == true) {
189							setStop( $this );
190						}
191						var _onload = function(){
192							setCss( $this,settings.direction );
193							setClone( $this,settings.clone );
194							setAnim( $this,num,settings.direction,settings.speed );
195
196							if (settings.responsive == true) {
197								$( window ).on(
198									'resize',
199									function(){
200										var i         = setResponsive( $this,settings.direction );
201										var styleid   = $this.attr( 'data-style' );
202										var stylehtml = $( '#' + styleid + '_style' ).html();
203
204										var stylehtml_new = stylehtml.replace( /to {transform:translate3d\((.*?)\)/,'to {transform:translate3d(' + i + ')' );
205										$( '#' + styleid + '_style' ).html( stylehtml_new );
206
207									}
208								);
209							}
210						};
211
212						if (window.loaded) {
213							_onload();
214						} else {
215							$( window ).on( 'load', _onload );
216						}
217					}
218				);
219
220			}
221		}
222	);
223})( 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.