jquery-slick-rails 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10b0ce18554094f73f17ec508985782e1e92bc44
|
4
|
+
data.tar.gz: c0be00eaca936fac05d72c76f84df568fff309c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874b5c462b75b674e36dd30a8b5b4b6d13e4c4c642fa3c522b7fb3019cad1fd641e94b8d4144ca6984c3ae793cff85146ed9b193d16ca905d3fd3b0975ab21b3
|
7
|
+
data.tar.gz: 6773b2ab80b09af6133f1a2dfb7d6381a530896035e5ba0dfdc3082def6cd5576f7570921b0519addb425393839522318d4633bbf5b462fd1bfc13a4a5af8cc7
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|___/_|_|\___|_|\_(_)/ |___/
|
7
7
|
|__/
|
8
8
|
|
9
|
-
Version: 1.
|
9
|
+
Version: 1.5.0
|
10
10
|
Author: Ken Wheeler
|
11
11
|
Website: http://kenwheeler.github.io
|
12
12
|
Docs: http://kenwheeler.github.io/slick
|
@@ -14,2136 +14,2236 @@
|
|
14
14
|
Issues: http://github.com/kenwheeler/slick/issues
|
15
15
|
|
16
16
|
*/
|
17
|
-
|
18
17
|
/* global window, document, define, jQuery, setInterval, clearInterval */
|
19
|
-
|
20
18
|
(function(factory) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
'use strict';
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['jquery'], factory);
|
22
|
+
} else if (typeof exports !== 'undefined') {
|
23
|
+
module.exports = factory(require('jquery'));
|
24
|
+
} else {
|
25
|
+
factory(jQuery);
|
26
|
+
}
|
29
27
|
|
30
28
|
}(function($) {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
dataSettings = $(element).data('slick') || {};
|
138
|
-
|
139
|
-
_.options = $.extend({}, _.defaults, dataSettings, settings);
|
140
|
-
|
141
|
-
_.currentSlide = _.options.initialSlide;
|
142
|
-
|
143
|
-
_.originalSettings = _.options;
|
144
|
-
responsiveSettings = _.options.responsive || null;
|
145
|
-
|
146
|
-
if (responsiveSettings && responsiveSettings.length > -1) {
|
147
|
-
_.respondTo = _.options.respondTo || "window";
|
148
|
-
for (breakpoint in responsiveSettings) {
|
149
|
-
if (responsiveSettings.hasOwnProperty(breakpoint)) {
|
150
|
-
_.breakpoints.push(responsiveSettings[
|
151
|
-
breakpoint].breakpoint);
|
152
|
-
_.breakpointSettings[responsiveSettings[
|
153
|
-
breakpoint].breakpoint] =
|
154
|
-
responsiveSettings[breakpoint].settings;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
_.breakpoints.sort(function(a, b) {
|
158
|
-
if(_.options.mobileFirst === true) {
|
159
|
-
return a - b;
|
160
|
-
} else {
|
161
|
-
return b - a;
|
162
|
-
}
|
163
|
-
});
|
164
|
-
}
|
165
|
-
|
166
|
-
if (typeof document.mozHidden !== "undefined") {
|
167
|
-
_.hidden = "mozHidden";
|
168
|
-
_.visibilityChange = "mozvisibilitychange";
|
169
|
-
} else if (typeof document.msHidden !== "undefined") {
|
170
|
-
_.hidden = "msHidden";
|
171
|
-
_.visibilityChange = "msvisibilitychange";
|
172
|
-
} else if (typeof document.webkitHidden !== "undefined") {
|
173
|
-
_.hidden = "webkitHidden";
|
174
|
-
_.visibilityChange = "webkitvisibilitychange";
|
175
|
-
}
|
176
|
-
|
177
|
-
_.autoPlay = $.proxy(_.autoPlay, _);
|
178
|
-
_.autoPlayClear = $.proxy(_.autoPlayClear, _);
|
179
|
-
_.changeSlide = $.proxy(_.changeSlide, _);
|
180
|
-
_.clickHandler = $.proxy(_.clickHandler, _);
|
181
|
-
_.selectHandler = $.proxy(_.selectHandler, _);
|
182
|
-
_.setPosition = $.proxy(_.setPosition, _);
|
183
|
-
_.swipeHandler = $.proxy(_.swipeHandler, _);
|
184
|
-
_.dragHandler = $.proxy(_.dragHandler, _);
|
185
|
-
_.keyHandler = $.proxy(_.keyHandler, _);
|
186
|
-
_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
|
187
|
-
|
188
|
-
_.instanceUid = instanceUid++;
|
189
|
-
|
190
|
-
// A simple way to check for HTML strings
|
191
|
-
// Strict HTML recognition (must start with <)
|
192
|
-
// Extracted from jQuery v1.11 source
|
193
|
-
_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
|
194
|
-
|
195
|
-
_.init();
|
196
|
-
|
197
|
-
_.checkResponsive(true);
|
29
|
+
'use strict';
|
30
|
+
var Slick = window.Slick || {};
|
31
|
+
|
32
|
+
Slick = (function() {
|
33
|
+
|
34
|
+
var instanceUid = 0;
|
35
|
+
|
36
|
+
function Slick(element, settings) {
|
37
|
+
|
38
|
+
var _ = this,
|
39
|
+
dataSettings, responsiveSettings, breakpoint;
|
40
|
+
|
41
|
+
_.defaults = {
|
42
|
+
accessibility: true,
|
43
|
+
adaptiveHeight: false,
|
44
|
+
appendArrows: $(element),
|
45
|
+
appendDots: $(element),
|
46
|
+
arrows: true,
|
47
|
+
asNavFor: null,
|
48
|
+
prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="previous">Previous</button>',
|
49
|
+
nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="next">Next</button>',
|
50
|
+
autoplay: false,
|
51
|
+
autoplaySpeed: 3000,
|
52
|
+
centerMode: false,
|
53
|
+
centerPadding: '50px',
|
54
|
+
cssEase: 'ease',
|
55
|
+
customPaging: function(slider, i) {
|
56
|
+
return '<button type="button" data-role="none">' + (i + 1) + '</button>';
|
57
|
+
},
|
58
|
+
dots: false,
|
59
|
+
dotsClass: 'slick-dots',
|
60
|
+
draggable: true,
|
61
|
+
easing: 'linear',
|
62
|
+
edgeFriction: 0.35,
|
63
|
+
fade: false,
|
64
|
+
focusOnSelect: false,
|
65
|
+
infinite: true,
|
66
|
+
initialSlide: 0,
|
67
|
+
lazyLoad: 'ondemand',
|
68
|
+
mobileFirst: false,
|
69
|
+
pauseOnHover: true,
|
70
|
+
pauseOnDotsHover: false,
|
71
|
+
respondTo: 'window',
|
72
|
+
responsive: null,
|
73
|
+
rtl: false,
|
74
|
+
slide: '',
|
75
|
+
slidesToShow: 1,
|
76
|
+
slidesToScroll: 1,
|
77
|
+
speed: 500,
|
78
|
+
swipe: true,
|
79
|
+
swipeToSlide: false,
|
80
|
+
touchMove: true,
|
81
|
+
touchThreshold: 5,
|
82
|
+
useCSS: true,
|
83
|
+
variableWidth: false,
|
84
|
+
vertical: false,
|
85
|
+
waitForAnimate: true
|
86
|
+
};
|
87
|
+
|
88
|
+
_.initials = {
|
89
|
+
animating: false,
|
90
|
+
dragging: false,
|
91
|
+
autoPlayTimer: null,
|
92
|
+
currentDirection: 0,
|
93
|
+
currentLeft: null,
|
94
|
+
currentSlide: 0,
|
95
|
+
direction: 1,
|
96
|
+
$dots: null,
|
97
|
+
listWidth: null,
|
98
|
+
listHeight: null,
|
99
|
+
loadIndex: 0,
|
100
|
+
$nextArrow: null,
|
101
|
+
$prevArrow: null,
|
102
|
+
slideCount: null,
|
103
|
+
slideWidth: null,
|
104
|
+
$slideTrack: null,
|
105
|
+
$slides: null,
|
106
|
+
sliding: false,
|
107
|
+
slideOffset: 0,
|
108
|
+
swipeLeft: null,
|
109
|
+
$list: null,
|
110
|
+
touchObject: {},
|
111
|
+
transformsEnabled: false,
|
112
|
+
verticalScrolling: false
|
113
|
+
};
|
114
|
+
|
115
|
+
$.extend(_, _.initials);
|
116
|
+
|
117
|
+
_.activeBreakpoint = null;
|
118
|
+
_.animType = null;
|
119
|
+
_.animProp = null;
|
120
|
+
_.breakpoints = [];
|
121
|
+
_.breakpointSettings = [];
|
122
|
+
_.cssTransitions = false;
|
123
|
+
_.hidden = 'hidden';
|
124
|
+
_.paused = false;
|
125
|
+
_.positionProp = null;
|
126
|
+
_.respondTo = null;
|
127
|
+
_.shouldClick = true;
|
128
|
+
_.$slider = $(element);
|
129
|
+
_.$slidesCache = null;
|
130
|
+
_.transformType = null;
|
131
|
+
_.transitionType = null;
|
132
|
+
_.visibilityChange = 'visibilitychange';
|
133
|
+
_.windowWidth = 0;
|
134
|
+
_.windowTimer = null;
|
198
135
|
|
199
|
-
|
136
|
+
dataSettings = $(element).data('slick') || {};
|
200
137
|
|
201
|
-
|
138
|
+
_.options = $.extend({}, _.defaults, dataSettings, settings);
|
202
139
|
|
203
|
-
|
140
|
+
_.currentSlide = _.options.initialSlide;
|
204
141
|
|
205
|
-
|
142
|
+
_.originalSettings = _.options;
|
143
|
+
responsiveSettings = _.options.responsive || null;
|
144
|
+
|
145
|
+
if (responsiveSettings && responsiveSettings.length > -1) {
|
146
|
+
_.respondTo = _.options.respondTo || 'window';
|
147
|
+
for (breakpoint in responsiveSettings) {
|
148
|
+
if (responsiveSettings.hasOwnProperty(breakpoint)) {
|
149
|
+
_.breakpoints.push(responsiveSettings[
|
150
|
+
breakpoint].breakpoint);
|
151
|
+
_.breakpointSettings[responsiveSettings[
|
152
|
+
breakpoint].breakpoint] =
|
153
|
+
responsiveSettings[breakpoint].settings;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
_.breakpoints.sort(function(a, b) {
|
157
|
+
if (_.options.mobileFirst === true) {
|
158
|
+
return a - b;
|
159
|
+
} else {
|
160
|
+
return b - a;
|
161
|
+
}
|
162
|
+
});
|
163
|
+
}
|
206
164
|
|
207
|
-
|
165
|
+
if (typeof document.mozHidden !== 'undefined') {
|
166
|
+
_.hidden = 'mozHidden';
|
167
|
+
_.visibilityChange = 'mozvisibilitychange';
|
168
|
+
} else if (typeof document.msHidden !== 'undefined') {
|
169
|
+
_.hidden = 'msHidden';
|
170
|
+
_.visibilityChange = 'msvisibilitychange';
|
171
|
+
} else if (typeof document.webkitHidden !== 'undefined') {
|
172
|
+
_.hidden = 'webkitHidden';
|
173
|
+
_.visibilityChange = 'webkitvisibilitychange';
|
174
|
+
}
|
208
175
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
176
|
+
_.autoPlay = $.proxy(_.autoPlay, _);
|
177
|
+
_.autoPlayClear = $.proxy(_.autoPlayClear, _);
|
178
|
+
_.changeSlide = $.proxy(_.changeSlide, _);
|
179
|
+
_.clickHandler = $.proxy(_.clickHandler, _);
|
180
|
+
_.selectHandler = $.proxy(_.selectHandler, _);
|
181
|
+
_.setPosition = $.proxy(_.setPosition, _);
|
182
|
+
_.swipeHandler = $.proxy(_.swipeHandler, _);
|
183
|
+
_.dragHandler = $.proxy(_.dragHandler, _);
|
184
|
+
_.keyHandler = $.proxy(_.keyHandler, _);
|
185
|
+
_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
|
215
186
|
|
216
|
-
|
187
|
+
_.instanceUid = instanceUid++;
|
217
188
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
$(markup).insertBefore(_.$slides.eq(index));
|
223
|
-
} else {
|
224
|
-
$(markup).insertAfter(_.$slides.eq(index));
|
225
|
-
}
|
226
|
-
} else {
|
227
|
-
if (addBefore === true) {
|
228
|
-
$(markup).prependTo(_.$slideTrack);
|
229
|
-
} else {
|
230
|
-
$(markup).appendTo(_.$slideTrack);
|
231
|
-
}
|
232
|
-
}
|
189
|
+
// A simple way to check for HTML strings
|
190
|
+
// Strict HTML recognition (must start with <)
|
191
|
+
// Extracted from jQuery v1.11 source
|
192
|
+
_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
|
233
193
|
|
234
|
-
|
194
|
+
_.init();
|
235
195
|
|
236
|
-
|
196
|
+
_.checkResponsive(true);
|
237
197
|
|
238
|
-
|
198
|
+
}
|
239
199
|
|
240
|
-
|
241
|
-
$(element).attr("data-slick-index",index);
|
242
|
-
});
|
200
|
+
return Slick;
|
243
201
|
|
244
|
-
|
202
|
+
}());
|
245
203
|
|
246
|
-
|
204
|
+
Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
|
247
205
|
|
248
|
-
|
206
|
+
var _ = this;
|
249
207
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
};
|
208
|
+
if (typeof(index) === 'boolean') {
|
209
|
+
addBefore = index;
|
210
|
+
index = null;
|
211
|
+
} else if (index < 0 || (index >= _.slideCount)) {
|
212
|
+
return false;
|
213
|
+
}
|
257
214
|
|
258
|
-
|
215
|
+
_.unload();
|
259
216
|
|
260
|
-
|
217
|
+
if (typeof(index) === 'number') {
|
218
|
+
if (index === 0 && _.$slides.length === 0) {
|
219
|
+
$(markup).appendTo(_.$slideTrack);
|
220
|
+
} else if (addBefore) {
|
221
|
+
$(markup).insertBefore(_.$slides.eq(index));
|
222
|
+
} else {
|
223
|
+
$(markup).insertAfter(_.$slides.eq(index));
|
224
|
+
}
|
225
|
+
} else {
|
226
|
+
if (addBefore === true) {
|
227
|
+
$(markup).prependTo(_.$slideTrack);
|
228
|
+
} else {
|
229
|
+
$(markup).appendTo(_.$slideTrack);
|
230
|
+
}
|
231
|
+
}
|
261
232
|
|
262
|
-
|
233
|
+
_.$slides = _.$slideTrack.children(this.options.slide);
|
263
234
|
|
264
|
-
|
265
|
-
targetLeft = -targetLeft;
|
266
|
-
}
|
267
|
-
if (_.transformsEnabled === false) {
|
268
|
-
if (_.options.vertical === false) {
|
269
|
-
_.$slideTrack.animate({
|
270
|
-
left: targetLeft
|
271
|
-
}, _.options.speed, _.options.easing, callback);
|
272
|
-
} else {
|
273
|
-
_.$slideTrack.animate({
|
274
|
-
top: targetLeft
|
275
|
-
}, _.options.speed, _.options.easing, callback);
|
276
|
-
}
|
235
|
+
_.$slideTrack.children(this.options.slide).detach();
|
277
236
|
|
278
|
-
|
237
|
+
_.$slideTrack.append(_.$slides);
|
279
238
|
|
280
|
-
|
281
|
-
|
282
|
-
_.currentLeft = -(_.currentLeft);
|
283
|
-
}
|
284
|
-
$({
|
285
|
-
animStart: _.currentLeft
|
286
|
-
}).animate({
|
287
|
-
animStart: targetLeft
|
288
|
-
}, {
|
289
|
-
duration: _.options.speed,
|
290
|
-
easing: _.options.easing,
|
291
|
-
step: function(now) {
|
292
|
-
now = Math.ceil(now);
|
293
|
-
if (_.options.vertical === false) {
|
294
|
-
animProps[_.animType] = 'translate(' +
|
295
|
-
now + 'px, 0px)';
|
296
|
-
_.$slideTrack.css(animProps);
|
297
|
-
} else {
|
298
|
-
animProps[_.animType] = 'translate(0px,' +
|
299
|
-
now + 'px)';
|
300
|
-
_.$slideTrack.css(animProps);
|
301
|
-
}
|
302
|
-
},
|
303
|
-
complete: function() {
|
304
|
-
if (callback) {
|
305
|
-
callback.call();
|
306
|
-
}
|
307
|
-
}
|
239
|
+
_.$slides.each(function(index, element) {
|
240
|
+
$(element).attr('data-slick-index', index);
|
308
241
|
});
|
309
242
|
|
310
|
-
|
243
|
+
_.$slidesCache = _.$slides;
|
311
244
|
|
312
|
-
_.
|
313
|
-
targetLeft = Math.ceil(targetLeft);
|
245
|
+
_.reinit();
|
314
246
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
247
|
+
};
|
248
|
+
|
249
|
+
Slick.prototype.animateHeight = function() {
|
250
|
+
var _ = this;
|
251
|
+
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
|
252
|
+
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
|
253
|
+
_.$list.animate({
|
254
|
+
height: targetHeight
|
255
|
+
}, _.options.speed);
|
319
256
|
}
|
320
|
-
|
257
|
+
};
|
258
|
+
|
259
|
+
Slick.prototype.animateSlide = function(targetLeft, callback) {
|
321
260
|
|
322
|
-
|
323
|
-
|
261
|
+
var animProps = {},
|
262
|
+
_ = this;
|
324
263
|
|
325
|
-
|
264
|
+
_.animateHeight();
|
326
265
|
|
327
|
-
|
328
|
-
|
266
|
+
if (_.options.rtl === true && _.options.vertical === false) {
|
267
|
+
targetLeft = -targetLeft;
|
329
268
|
}
|
269
|
+
if (_.transformsEnabled === false) {
|
270
|
+
if (_.options.vertical === false) {
|
271
|
+
_.$slideTrack.animate({
|
272
|
+
left: targetLeft
|
273
|
+
}, _.options.speed, _.options.easing, callback);
|
274
|
+
} else {
|
275
|
+
_.$slideTrack.animate({
|
276
|
+
top: targetLeft
|
277
|
+
}, _.options.speed, _.options.easing, callback);
|
278
|
+
}
|
330
279
|
|
331
|
-
|
280
|
+
} else {
|
332
281
|
|
333
|
-
|
282
|
+
if (_.cssTransitions === false) {
|
283
|
+
if (_.options.rtl === true) {
|
284
|
+
_.currentLeft = -(_.currentLeft);
|
285
|
+
}
|
286
|
+
$({
|
287
|
+
animStart: _.currentLeft
|
288
|
+
}).animate({
|
289
|
+
animStart: targetLeft
|
290
|
+
}, {
|
291
|
+
duration: _.options.speed,
|
292
|
+
easing: _.options.easing,
|
293
|
+
step: function(now) {
|
294
|
+
now = Math.ceil(now);
|
295
|
+
if (_.options.vertical === false) {
|
296
|
+
animProps[_.animType] = 'translate(' +
|
297
|
+
now + 'px, 0px)';
|
298
|
+
_.$slideTrack.css(animProps);
|
299
|
+
} else {
|
300
|
+
animProps[_.animType] = 'translate(0px,' +
|
301
|
+
now + 'px)';
|
302
|
+
_.$slideTrack.css(animProps);
|
303
|
+
}
|
304
|
+
},
|
305
|
+
complete: function() {
|
306
|
+
if (callback) {
|
307
|
+
callback.call();
|
308
|
+
}
|
309
|
+
}
|
310
|
+
});
|
334
311
|
|
335
|
-
|
312
|
+
} else {
|
336
313
|
|
337
|
-
|
338
|
-
|
339
|
-
if(asNavFor !== null) asNavFor.slideHandler(index, true);
|
340
|
-
};
|
314
|
+
_.applyTransition();
|
315
|
+
targetLeft = Math.ceil(targetLeft);
|
341
316
|
|
342
|
-
|
317
|
+
if (_.options.vertical === false) {
|
318
|
+
animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
|
319
|
+
} else {
|
320
|
+
animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
|
321
|
+
}
|
322
|
+
_.$slideTrack.css(animProps);
|
343
323
|
|
344
|
-
|
345
|
-
|
324
|
+
if (callback) {
|
325
|
+
setTimeout(function() {
|
346
326
|
|
347
|
-
|
348
|
-
transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
|
349
|
-
} else {
|
350
|
-
transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
|
351
|
-
}
|
327
|
+
_.disableTransition();
|
352
328
|
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
_.$slides.eq(slide).css(transition);
|
357
|
-
}
|
329
|
+
callback.call();
|
330
|
+
}, _.options.speed);
|
331
|
+
}
|
358
332
|
|
359
|
-
|
333
|
+
}
|
360
334
|
|
361
|
-
|
335
|
+
}
|
362
336
|
|
363
|
-
|
337
|
+
};
|
364
338
|
|
365
|
-
|
366
|
-
|
367
|
-
|
339
|
+
Slick.prototype.asNavFor = function(index) {
|
340
|
+
var _ = this,
|
341
|
+
asNavFor = _.options.asNavFor !== null ? $(_.options.asNavFor).slick('getSlick') : null;
|
342
|
+
if (asNavFor !== null) asNavFor.slideHandler(index, true);
|
343
|
+
};
|
368
344
|
|
369
|
-
|
370
|
-
_.autoPlayTimer = setInterval(_.autoPlayIterator,
|
371
|
-
_.options.autoplaySpeed);
|
372
|
-
}
|
345
|
+
Slick.prototype.applyTransition = function(slide) {
|
373
346
|
|
374
|
-
|
347
|
+
var _ = this,
|
348
|
+
transition = {};
|
375
349
|
|
376
|
-
|
350
|
+
if (_.options.fade === false) {
|
351
|
+
transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
|
352
|
+
} else {
|
353
|
+
transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
|
354
|
+
}
|
377
355
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
356
|
+
if (_.options.fade === false) {
|
357
|
+
_.$slideTrack.css(transition);
|
358
|
+
} else {
|
359
|
+
_.$slides.eq(slide).css(transition);
|
360
|
+
}
|
382
361
|
|
383
|
-
|
362
|
+
};
|
384
363
|
|
385
|
-
|
364
|
+
Slick.prototype.autoPlay = function() {
|
386
365
|
|
387
|
-
|
366
|
+
var _ = this;
|
388
367
|
|
389
|
-
|
368
|
+
if (_.autoPlayTimer) {
|
369
|
+
clearInterval(_.autoPlayTimer);
|
370
|
+
}
|
390
371
|
|
391
|
-
|
372
|
+
if (_.slideCount > _.options.slidesToShow && _.paused !== true) {
|
373
|
+
_.autoPlayTimer = setInterval(_.autoPlayIterator,
|
374
|
+
_.options.autoplaySpeed);
|
375
|
+
}
|
392
376
|
|
393
|
-
|
394
|
-
|
395
|
-
|
377
|
+
};
|
378
|
+
|
379
|
+
Slick.prototype.autoPlayClear = function() {
|
380
|
+
|
381
|
+
var _ = this;
|
382
|
+
if (_.autoPlayTimer) {
|
383
|
+
clearInterval(_.autoPlayTimer);
|
396
384
|
}
|
397
385
|
|
398
|
-
|
386
|
+
};
|
399
387
|
|
400
|
-
|
388
|
+
Slick.prototype.autoPlayIterator = function() {
|
401
389
|
|
402
|
-
|
390
|
+
var _ = this;
|
403
391
|
|
404
|
-
|
392
|
+
if (_.options.infinite === false) {
|
405
393
|
|
406
|
-
|
394
|
+
if (_.direction === 1) {
|
407
395
|
|
408
|
-
|
396
|
+
if ((_.currentSlide + 1) === _.slideCount -
|
397
|
+
1) {
|
398
|
+
_.direction = 0;
|
399
|
+
}
|
409
400
|
|
410
|
-
|
401
|
+
_.slideHandler(_.currentSlide + _.options.slidesToScroll);
|
411
402
|
|
412
|
-
|
403
|
+
} else {
|
413
404
|
|
414
|
-
|
405
|
+
if ((_.currentSlide - 1 === 0)) {
|
415
406
|
|
416
|
-
|
407
|
+
_.direction = 1;
|
417
408
|
|
418
|
-
|
409
|
+
}
|
419
410
|
|
420
|
-
|
411
|
+
_.slideHandler(_.currentSlide - _.options.slidesToScroll);
|
421
412
|
|
422
|
-
|
413
|
+
}
|
423
414
|
|
424
|
-
|
415
|
+
} else {
|
425
416
|
|
426
|
-
|
427
|
-
_.$nextArrow = $(_.options.nextArrow);
|
417
|
+
_.slideHandler(_.currentSlide + _.options.slidesToScroll);
|
428
418
|
|
429
|
-
|
430
|
-
_.$prevArrow.appendTo(_.options.appendArrows);
|
431
|
-
}
|
419
|
+
}
|
432
420
|
|
433
|
-
|
434
|
-
_.$nextArrow.appendTo(_.options.appendArrows);
|
435
|
-
}
|
421
|
+
};
|
436
422
|
|
437
|
-
|
438
|
-
_.$prevArrow.addClass('slick-disabled');
|
439
|
-
}
|
423
|
+
Slick.prototype.buildArrows = function() {
|
440
424
|
|
441
|
-
|
425
|
+
var _ = this;
|
442
426
|
|
443
|
-
|
427
|
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
444
428
|
|
445
|
-
|
429
|
+
_.$prevArrow = $(_.options.prevArrow);
|
430
|
+
_.$nextArrow = $(_.options.nextArrow);
|
446
431
|
|
447
|
-
|
448
|
-
|
432
|
+
if (_.htmlExpr.test(_.options.prevArrow)) {
|
433
|
+
_.$prevArrow.appendTo(_.options.appendArrows);
|
434
|
+
}
|
449
435
|
|
450
|
-
|
436
|
+
if (_.htmlExpr.test(_.options.nextArrow)) {
|
437
|
+
_.$nextArrow.appendTo(_.options.appendArrows);
|
438
|
+
}
|
451
439
|
|
452
|
-
|
440
|
+
if (_.options.infinite !== true) {
|
441
|
+
_.$prevArrow.addClass('slick-disabled');
|
442
|
+
}
|
453
443
|
|
454
|
-
|
455
|
-
dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
|
456
|
-
}
|
444
|
+
}
|
457
445
|
|
458
|
-
|
446
|
+
};
|
459
447
|
|
460
|
-
|
461
|
-
_.options.appendDots);
|
448
|
+
Slick.prototype.buildDots = function() {
|
462
449
|
|
463
|
-
|
450
|
+
var _ = this,
|
451
|
+
i, dotString;
|
464
452
|
|
465
|
-
|
453
|
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
466
454
|
|
467
|
-
|
455
|
+
dotString = '<ul class="' + _.options.dotsClass + '">';
|
468
456
|
|
469
|
-
|
457
|
+
for (i = 0; i <= _.getDotCount(); i += 1) {
|
458
|
+
dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
|
459
|
+
}
|
470
460
|
|
471
|
-
|
461
|
+
dotString += '</ul>';
|
472
462
|
|
473
|
-
|
474
|
-
|
475
|
-
'slick-slide');
|
476
|
-
_.slideCount = _.$slides.length;
|
463
|
+
_.$dots = $(dotString).appendTo(
|
464
|
+
_.options.appendDots);
|
477
465
|
|
478
|
-
|
479
|
-
$(element).attr("data-slick-index",index);
|
480
|
-
});
|
466
|
+
_.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');
|
481
467
|
|
482
|
-
|
468
|
+
}
|
483
469
|
|
484
|
-
|
470
|
+
};
|
485
471
|
|
486
|
-
|
487
|
-
$('<div class="slick-track"/>').appendTo(_.$slider) :
|
488
|
-
_.$slides.wrapAll('<div class="slick-track"/>').parent();
|
472
|
+
Slick.prototype.buildOut = function() {
|
489
473
|
|
490
|
-
|
491
|
-
'<div aria-live="polite" class="slick-list"/>').parent();
|
492
|
-
_.$slideTrack.css('opacity', 0);
|
474
|
+
var _ = this;
|
493
475
|
|
494
|
-
|
495
|
-
|
496
|
-
|
476
|
+
_.$slides = _.$slider.children(_.options.slide +
|
477
|
+
':not(.slick-cloned)').addClass(
|
478
|
+
'slick-slide');
|
479
|
+
_.slideCount = _.$slides.length;
|
497
480
|
|
498
|
-
|
481
|
+
_.$slides.each(function(index, element) {
|
482
|
+
$(element).attr('data-slick-index', index);
|
483
|
+
});
|
499
484
|
|
500
|
-
|
485
|
+
_.$slidesCache = _.$slides;
|
501
486
|
|
502
|
-
|
487
|
+
_.$slider.addClass('slick-slider');
|
503
488
|
|
504
|
-
|
489
|
+
_.$slideTrack = (_.slideCount === 0) ?
|
490
|
+
$('<div class="slick-track"/>').appendTo(_.$slider) :
|
491
|
+
_.$slides.wrapAll('<div class="slick-track"/>').parent();
|
505
492
|
|
506
|
-
|
493
|
+
_.$list = _.$slideTrack.wrap(
|
494
|
+
'<div aria-live="polite" class="slick-list"/>').parent();
|
495
|
+
_.$slideTrack.css('opacity', 0);
|
507
496
|
|
508
|
-
|
509
|
-
|
510
|
-
|
497
|
+
if (_.options.centerMode === true || _.options.swipeToSlide === true) {
|
498
|
+
_.options.slidesToScroll = 1;
|
499
|
+
}
|
511
500
|
|
512
|
-
|
501
|
+
$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
|
513
502
|
|
514
|
-
|
515
|
-
_.$list.addClass('draggable');
|
516
|
-
}
|
503
|
+
_.setupInfinite();
|
517
504
|
|
518
|
-
|
505
|
+
_.buildArrows();
|
519
506
|
|
520
|
-
|
507
|
+
_.buildDots();
|
521
508
|
|
522
|
-
|
523
|
-
breakpoint, targetBreakpoint, respondToWidth;
|
524
|
-
var sliderWidth = _.$slider.width();
|
525
|
-
var windowWidth = window.innerWidth || $(window).width();
|
526
|
-
if (_.respondTo === "window") {
|
527
|
-
respondToWidth = windowWidth;
|
528
|
-
} else if (_.respondTo === "slider") {
|
529
|
-
respondToWidth = sliderWidth;
|
530
|
-
} else if (_.respondTo === "min") {
|
531
|
-
respondToWidth = Math.min(windowWidth, sliderWidth);
|
532
|
-
}
|
509
|
+
_.updateDots();
|
533
510
|
|
534
|
-
|
535
|
-
|
511
|
+
if (_.options.accessibility === true) {
|
512
|
+
_.$list.prop('tabIndex', 0);
|
513
|
+
}
|
536
514
|
|
537
|
-
|
515
|
+
_.setSlideClasses(typeof this.currentSlide === 'number' ? this.currentSlide : 0);
|
538
516
|
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
517
|
+
if (_.options.draggable === true) {
|
518
|
+
_.$list.addClass('draggable');
|
519
|
+
}
|
520
|
+
|
521
|
+
};
|
522
|
+
|
523
|
+
Slick.prototype.checkResponsive = function(initial) {
|
524
|
+
|
525
|
+
var _ = this,
|
526
|
+
breakpoint, targetBreakpoint, respondToWidth;
|
527
|
+
var sliderWidth = _.$slider.width();
|
528
|
+
var windowWidth = window.innerWidth || $(window).width();
|
529
|
+
if (_.respondTo === 'window') {
|
530
|
+
respondToWidth = windowWidth;
|
531
|
+
} else if (_.respondTo === 'slider') {
|
532
|
+
respondToWidth = sliderWidth;
|
533
|
+
} else if (_.respondTo === 'min') {
|
534
|
+
respondToWidth = Math.min(windowWidth, sliderWidth);
|
550
535
|
}
|
551
|
-
}
|
552
536
|
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
537
|
+
if (_.originalSettings.responsive && _.originalSettings
|
538
|
+
.responsive.length > -1 && _.originalSettings.responsive !== null) {
|
539
|
+
|
540
|
+
targetBreakpoint = null;
|
541
|
+
|
542
|
+
for (breakpoint in _.breakpoints) {
|
543
|
+
if (_.breakpoints.hasOwnProperty(breakpoint)) {
|
544
|
+
if (_.originalSettings.mobileFirst === false) {
|
545
|
+
if (respondToWidth < _.breakpoints[breakpoint]) {
|
546
|
+
targetBreakpoint = _.breakpoints[breakpoint];
|
547
|
+
}
|
548
|
+
} else {
|
549
|
+
if (respondToWidth > _.breakpoints[breakpoint]) {
|
550
|
+
targetBreakpoint = _.breakpoints[breakpoint];
|
551
|
+
}
|
552
|
+
}
|
553
|
+
}
|
554
|
+
}
|
555
|
+
|
556
|
+
if (targetBreakpoint !== null) {
|
557
|
+
if (_.activeBreakpoint !== null) {
|
558
|
+
if (targetBreakpoint !== _.activeBreakpoint) {
|
559
|
+
_.activeBreakpoint =
|
560
|
+
targetBreakpoint;
|
561
|
+
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
|
562
|
+
_.unslick();
|
563
|
+
} else {
|
564
|
+
_.options = $.extend({}, _.originalSettings,
|
565
|
+
_.breakpointSettings[
|
566
|
+
targetBreakpoint]);
|
567
|
+
if (initial === true)
|
568
|
+
_.currentSlide = _.options.initialSlide;
|
569
|
+
_.refresh();
|
570
|
+
}
|
571
|
+
}
|
572
|
+
} else {
|
573
|
+
_.activeBreakpoint = targetBreakpoint;
|
574
|
+
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
|
575
|
+
_.unslick();
|
576
|
+
} else {
|
577
|
+
_.options = $.extend({}, _.originalSettings,
|
578
|
+
_.breakpointSettings[
|
579
|
+
targetBreakpoint]);
|
580
|
+
if (initial === true)
|
581
|
+
_.currentSlide = _.options.initialSlide;
|
582
|
+
_.refresh();
|
583
|
+
}
|
584
|
+
}
|
560
585
|
} else {
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
586
|
+
if (_.activeBreakpoint !== null) {
|
587
|
+
_.activeBreakpoint = null;
|
588
|
+
_.options = _.originalSettings;
|
589
|
+
if (initial === true)
|
590
|
+
_.currentSlide = _.options.initialSlide;
|
591
|
+
_.refresh();
|
592
|
+
}
|
567
593
|
}
|
568
|
-
|
569
|
-
} else {
|
570
|
-
_.activeBreakpoint = targetBreakpoint;
|
571
|
-
if(_.breakpointSettings[targetBreakpoint] === "unslick") {
|
572
|
-
_.unslick();
|
573
|
-
} else {
|
574
|
-
_.options = $.extend({}, _.originalSettings,
|
575
|
-
_.breakpointSettings[
|
576
|
-
targetBreakpoint]);
|
577
|
-
if(initial === true)
|
578
|
-
_.currentSlide = _.options.initialSlide;
|
579
|
-
_.refresh();
|
580
|
-
}
|
581
|
-
}
|
582
|
-
} else {
|
583
|
-
if (_.activeBreakpoint !== null) {
|
584
|
-
_.activeBreakpoint = null;
|
585
|
-
_.options = _.originalSettings;
|
586
|
-
if(initial === true)
|
587
|
-
_.currentSlide = _.options.initialSlide;
|
588
|
-
_.refresh();
|
594
|
+
|
589
595
|
}
|
590
|
-
}
|
591
596
|
|
592
|
-
}
|
597
|
+
};
|
593
598
|
|
594
|
-
|
599
|
+
Slick.prototype.changeSlide = function(event, dontAnimate) {
|
595
600
|
|
596
|
-
|
601
|
+
var _ = this,
|
602
|
+
$target = $(event.target),
|
603
|
+
indexOffset, slideOffset, unevenOffset;
|
597
604
|
|
598
|
-
|
599
|
-
$target
|
600
|
-
indexOffset, slideOffset, unevenOffset;
|
605
|
+
// If target is a link, prevent default action.
|
606
|
+
$target.is('a') && event.preventDefault();
|
601
607
|
|
602
|
-
|
603
|
-
|
608
|
+
unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
|
609
|
+
indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
|
604
610
|
|
605
|
-
|
606
|
-
indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
|
611
|
+
switch (event.data.message) {
|
607
612
|
|
608
|
-
|
613
|
+
case 'previous':
|
614
|
+
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
|
615
|
+
if (_.slideCount > _.options.slidesToShow) {
|
616
|
+
_.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
|
617
|
+
}
|
618
|
+
break;
|
609
619
|
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
620
|
+
case 'next':
|
621
|
+
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
|
622
|
+
if (_.slideCount > _.options.slidesToShow) {
|
623
|
+
_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
|
624
|
+
}
|
625
|
+
break;
|
626
|
+
|
627
|
+
case 'index':
|
628
|
+
var index = event.data.index === 0 ? 0 :
|
629
|
+
event.data.index || $(event.target).parent().index() * _.options.slidesToScroll;
|
616
630
|
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
631
|
+
_.slideHandler(_.checkNavigable(index), false, dontAnimate);
|
632
|
+
break;
|
633
|
+
|
634
|
+
default:
|
635
|
+
return;
|
621
636
|
}
|
622
|
-
break;
|
623
637
|
|
624
|
-
|
625
|
-
var index = event.data.index === 0 ? 0 :
|
626
|
-
event.data.index || $(event.target).parent().index() * _.options.slidesToScroll;
|
638
|
+
};
|
627
639
|
|
628
|
-
|
629
|
-
break;
|
640
|
+
Slick.prototype.checkNavigable = function(index) {
|
630
641
|
|
631
|
-
|
632
|
-
|
633
|
-
}
|
642
|
+
var _ = this,
|
643
|
+
navigables, prevNavigable;
|
634
644
|
|
635
|
-
|
645
|
+
navigables = _.getNavigableIndexes();
|
646
|
+
prevNavigable = 0;
|
647
|
+
if (index > navigables[navigables.length - 1]) {
|
648
|
+
index = navigables[navigables.length - 1];
|
649
|
+
} else {
|
650
|
+
for (var n in navigables) {
|
651
|
+
if (index < navigables[n]) {
|
652
|
+
index = prevNavigable;
|
653
|
+
break;
|
654
|
+
}
|
655
|
+
prevNavigable = navigables[n];
|
656
|
+
}
|
657
|
+
}
|
636
658
|
|
637
|
-
|
659
|
+
return index;
|
660
|
+
};
|
638
661
|
|
639
|
-
|
662
|
+
Slick.prototype.cleanUpEvents = function() {
|
640
663
|
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
} else {
|
646
|
-
for(var n in navigables) {
|
647
|
-
if(index < navigables[n]) {
|
648
|
-
index = prevNavigable;
|
649
|
-
break;
|
664
|
+
var _ = this;
|
665
|
+
|
666
|
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
667
|
+
$('li', _.$dots).off('click.slick', _.changeSlide);
|
650
668
|
}
|
651
|
-
prevNavigable = navigables[n];
|
652
|
-
}
|
653
|
-
}
|
654
669
|
|
655
|
-
|
656
|
-
|
670
|
+
if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) {
|
671
|
+
$('li', _.$dots)
|
672
|
+
.off('mouseenter.slick', _.setPaused.bind(_, true))
|
673
|
+
.off('mouseleave.slick', _.setPaused.bind(_, false));
|
674
|
+
}
|
657
675
|
|
658
|
-
|
676
|
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
677
|
+
_.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
|
678
|
+
_.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
|
679
|
+
}
|
659
680
|
|
660
|
-
|
681
|
+
_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
|
682
|
+
_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
|
683
|
+
_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
|
684
|
+
_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
|
661
685
|
|
662
|
-
|
663
|
-
event.stopImmediatePropagation();
|
664
|
-
event.stopPropagation();
|
665
|
-
event.preventDefault();
|
666
|
-
}
|
686
|
+
_.$list.off('click.slick', _.clickHandler);
|
667
687
|
|
668
|
-
|
688
|
+
if (_.options.autoplay === true) {
|
689
|
+
$(document).off(_.visibilityChange, _.visibility);
|
690
|
+
}
|
669
691
|
|
670
|
-
|
692
|
+
_.$list.off('mouseenter.slick', _.setPaused.bind(_, true));
|
693
|
+
_.$list.off('mouseleave.slick', _.setPaused.bind(_, false));
|
671
694
|
|
672
|
-
|
695
|
+
if (_.options.accessibility === true) {
|
696
|
+
_.$list.off('keydown.slick', _.keyHandler);
|
697
|
+
}
|
673
698
|
|
674
|
-
|
699
|
+
if (_.options.focusOnSelect === true) {
|
700
|
+
$(_.$slideTrack).children().off('click.slick', _.selectHandler);
|
701
|
+
}
|
675
702
|
|
676
|
-
|
703
|
+
$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
|
677
704
|
|
678
|
-
|
679
|
-
if (_.$dots) {
|
680
|
-
_.$dots.remove();
|
681
|
-
}
|
682
|
-
if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
|
683
|
-
_.$prevArrow.remove();
|
684
|
-
}
|
685
|
-
if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
|
686
|
-
_.$nextArrow.remove();
|
687
|
-
}
|
705
|
+
$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
|
688
706
|
|
707
|
+
$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
|
689
708
|
|
690
|
-
|
691
|
-
.
|
692
|
-
|
693
|
-
.css({
|
694
|
-
position: '',
|
695
|
-
left: '',
|
696
|
-
top: '',
|
697
|
-
zIndex: '',
|
698
|
-
opacity: '',
|
699
|
-
width: ''
|
700
|
-
});
|
709
|
+
$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
|
710
|
+
$(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
|
711
|
+
};
|
701
712
|
|
702
|
-
|
703
|
-
_.$slider.removeClass('slick-initialized');
|
713
|
+
Slick.prototype.clickHandler = function(event) {
|
704
714
|
|
705
|
-
|
706
|
-
$(window).off('.slick-' + _.instanceUid);
|
707
|
-
$(document).off('.slick-' + _.instanceUid);
|
715
|
+
var _ = this;
|
708
716
|
|
709
|
-
|
717
|
+
if (_.shouldClick === false) {
|
718
|
+
event.stopImmediatePropagation();
|
719
|
+
event.stopPropagation();
|
720
|
+
event.preventDefault();
|
721
|
+
}
|
710
722
|
|
711
|
-
|
723
|
+
};
|
712
724
|
|
713
|
-
|
725
|
+
Slick.prototype.destroy = function() {
|
714
726
|
|
715
|
-
|
716
|
-
transition = {};
|
727
|
+
var _ = this;
|
717
728
|
|
718
|
-
|
729
|
+
_.autoPlayClear();
|
719
730
|
|
720
|
-
|
721
|
-
_.$slideTrack.css(transition);
|
722
|
-
} else {
|
723
|
-
_.$slides.eq(slide).css(transition);
|
724
|
-
}
|
731
|
+
_.touchObject = {};
|
725
732
|
|
726
|
-
|
733
|
+
_.cleanUpEvents();
|
727
734
|
|
728
|
-
|
735
|
+
$('.slick-cloned', _.$slider).remove();
|
729
736
|
|
730
|
-
|
737
|
+
if (_.$dots) {
|
738
|
+
_.$dots.remove();
|
739
|
+
}
|
740
|
+
if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
|
741
|
+
_.$prevArrow.remove();
|
742
|
+
}
|
743
|
+
if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
|
744
|
+
_.$nextArrow.remove();
|
745
|
+
}
|
731
746
|
|
732
|
-
|
747
|
+
if (_.$slides) {
|
748
|
+
_.$slides.removeClass('slick-slide slick-active slick-center slick-visible')
|
749
|
+
.attr('aria-hidden', 'true')
|
750
|
+
.removeAttr('data-slick-index')
|
751
|
+
.css({
|
752
|
+
position: '',
|
753
|
+
left: '',
|
754
|
+
top: '',
|
755
|
+
zIndex: '',
|
756
|
+
opacity: '',
|
757
|
+
width: ''
|
758
|
+
});
|
759
|
+
|
760
|
+
_.$slider.html(_.$slides);
|
761
|
+
}
|
733
762
|
|
734
|
-
|
735
|
-
|
736
|
-
});
|
763
|
+
_.$slider.removeClass('slick-slider');
|
764
|
+
_.$slider.removeClass('slick-initialized');
|
737
765
|
|
738
|
-
|
739
|
-
opacity: 1
|
740
|
-
}, _.options.speed, _.options.easing, callback);
|
766
|
+
};
|
741
767
|
|
742
|
-
|
768
|
+
Slick.prototype.disableTransition = function(slide) {
|
743
769
|
|
744
|
-
|
770
|
+
var _ = this,
|
771
|
+
transition = {};
|
745
772
|
|
746
|
-
|
747
|
-
opacity: 1,
|
748
|
-
zIndex: 1000
|
749
|
-
});
|
773
|
+
transition[_.transitionType] = '';
|
750
774
|
|
751
|
-
|
752
|
-
|
775
|
+
if (_.options.fade === false) {
|
776
|
+
_.$slideTrack.css(transition);
|
777
|
+
} else {
|
778
|
+
_.$slides.eq(slide).css(transition);
|
779
|
+
}
|
753
780
|
|
754
|
-
|
781
|
+
};
|
755
782
|
|
756
|
-
|
757
|
-
}, _.options.speed);
|
758
|
-
}
|
783
|
+
Slick.prototype.fadeSlide = function(slideIndex, callback) {
|
759
784
|
|
760
|
-
|
785
|
+
var _ = this;
|
761
786
|
|
762
|
-
|
787
|
+
if (_.cssTransitions === false) {
|
763
788
|
|
764
|
-
|
789
|
+
_.$slides.eq(slideIndex).css({
|
790
|
+
zIndex: 1000
|
791
|
+
});
|
765
792
|
|
766
|
-
|
793
|
+
_.$slides.eq(slideIndex).animate({
|
794
|
+
opacity: 1
|
795
|
+
}, _.options.speed, _.options.easing, callback);
|
767
796
|
|
768
|
-
|
797
|
+
} else {
|
769
798
|
|
770
|
-
|
799
|
+
_.applyTransition(slideIndex);
|
771
800
|
|
772
|
-
|
801
|
+
_.$slides.eq(slideIndex).css({
|
802
|
+
opacity: 1,
|
803
|
+
zIndex: 1000
|
804
|
+
});
|
773
805
|
|
774
|
-
|
806
|
+
if (callback) {
|
807
|
+
setTimeout(function() {
|
775
808
|
|
776
|
-
|
809
|
+
_.disableTransition(slideIndex);
|
777
810
|
|
778
|
-
|
811
|
+
callback.call();
|
812
|
+
}, _.options.speed);
|
813
|
+
}
|
779
814
|
|
780
|
-
|
815
|
+
}
|
781
816
|
|
782
|
-
|
817
|
+
};
|
783
818
|
|
784
|
-
|
785
|
-
return _.currentSlide;
|
819
|
+
Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
|
786
820
|
|
787
|
-
|
821
|
+
var _ = this;
|
788
822
|
|
789
|
-
|
823
|
+
if (filter !== null) {
|
790
824
|
|
791
|
-
|
825
|
+
_.unload();
|
792
826
|
|
793
|
-
|
794
|
-
var counter = 0;
|
795
|
-
var pagerQty = 0;
|
827
|
+
_.$slideTrack.children(this.options.slide).detach();
|
796
828
|
|
797
|
-
|
798
|
-
pagerQty = Math.ceil(_.slideCount / _.options.slidesToScroll);
|
799
|
-
} else if (_.options.centerMode === true) {
|
800
|
-
pagerQty = _.slideCount;
|
801
|
-
} else {
|
802
|
-
while (breakPoint < _.slideCount){
|
803
|
-
++pagerQty;
|
804
|
-
breakPoint = counter + _.options.slidesToShow;
|
805
|
-
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
806
|
-
}
|
807
|
-
}
|
829
|
+
_.$slidesCache.filter(filter).appendTo(_.$slideTrack);
|
808
830
|
|
809
|
-
|
810
|
-
|
811
|
-
};
|
812
|
-
|
813
|
-
Slick.prototype.getLeft = function(slideIndex) {
|
814
|
-
|
815
|
-
var _ = this,
|
816
|
-
targetLeft,
|
817
|
-
verticalHeight,
|
818
|
-
verticalOffset = 0,
|
819
|
-
targetSlide;
|
820
|
-
|
821
|
-
_.slideOffset = 0;
|
822
|
-
verticalHeight = _.$slides.first().outerHeight();
|
823
|
-
|
824
|
-
if (_.options.infinite === true) {
|
825
|
-
if (_.slideCount > _.options.slidesToShow) {
|
826
|
-
_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
|
827
|
-
verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
|
828
|
-
}
|
829
|
-
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
830
|
-
if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
|
831
|
-
if(slideIndex > _.slideCount) {
|
832
|
-
_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
|
833
|
-
verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
|
834
|
-
} else {
|
835
|
-
_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
|
836
|
-
verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
|
837
|
-
}
|
838
|
-
}
|
839
|
-
}
|
840
|
-
} else {
|
841
|
-
if(slideIndex + _.options.slidesToShow > _.slideCount) {
|
842
|
-
_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
|
843
|
-
verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
|
844
|
-
}
|
845
|
-
}
|
831
|
+
_.reinit();
|
846
832
|
|
847
|
-
|
848
|
-
_.slideOffset = 0;
|
849
|
-
verticalOffset = 0;
|
850
|
-
}
|
833
|
+
}
|
851
834
|
|
852
|
-
|
853
|
-
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
|
854
|
-
} else if (_.options.centerMode === true) {
|
855
|
-
_.slideOffset = 0;
|
856
|
-
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
|
857
|
-
}
|
835
|
+
};
|
858
836
|
|
859
|
-
|
860
|
-
targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
|
861
|
-
} else {
|
862
|
-
targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
|
863
|
-
}
|
837
|
+
Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
|
864
838
|
|
865
|
-
|
839
|
+
var _ = this;
|
840
|
+
return _.currentSlide;
|
866
841
|
|
867
|
-
|
868
|
-
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
869
|
-
} else {
|
870
|
-
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
|
871
|
-
}
|
842
|
+
};
|
872
843
|
|
873
|
-
|
844
|
+
Slick.prototype.getDotCount = function() {
|
874
845
|
|
875
|
-
|
876
|
-
|
877
|
-
|
846
|
+
var _ = this;
|
847
|
+
|
848
|
+
var breakPoint = 0;
|
849
|
+
var counter = 0;
|
850
|
+
var pagerQty = 0;
|
851
|
+
|
852
|
+
if (_.options.infinite === true) {
|
853
|
+
pagerQty = Math.ceil(_.slideCount / _.options.slidesToScroll);
|
854
|
+
} else if (_.options.centerMode === true) {
|
855
|
+
pagerQty = _.slideCount;
|
878
856
|
} else {
|
879
|
-
|
857
|
+
while (breakPoint < _.slideCount) {
|
858
|
+
++pagerQty;
|
859
|
+
breakPoint = counter + _.options.slidesToShow;
|
860
|
+
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
861
|
+
}
|
880
862
|
}
|
881
|
-
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
882
|
-
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
|
883
|
-
}
|
884
|
-
}
|
885
863
|
|
886
|
-
|
864
|
+
return pagerQty - 1;
|
887
865
|
|
888
|
-
|
866
|
+
};
|
889
867
|
|
890
|
-
|
868
|
+
Slick.prototype.getLeft = function(slideIndex) {
|
891
869
|
|
892
|
-
|
870
|
+
var _ = this,
|
871
|
+
targetLeft,
|
872
|
+
verticalHeight,
|
873
|
+
verticalOffset = 0,
|
874
|
+
targetSlide;
|
893
875
|
|
894
|
-
|
876
|
+
_.slideOffset = 0;
|
877
|
+
verticalHeight = _.$slides.first().outerHeight();
|
895
878
|
|
896
|
-
|
897
|
-
|
898
|
-
|
879
|
+
if (_.options.infinite === true) {
|
880
|
+
if (_.slideCount > _.options.slidesToShow) {
|
881
|
+
_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
|
882
|
+
verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
|
883
|
+
}
|
884
|
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
885
|
+
if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
|
886
|
+
if (slideIndex > _.slideCount) {
|
887
|
+
_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
|
888
|
+
verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
|
889
|
+
} else {
|
890
|
+
_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
|
891
|
+
verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
|
892
|
+
}
|
893
|
+
}
|
894
|
+
}
|
895
|
+
} else {
|
896
|
+
if (slideIndex + _.options.slidesToShow > _.slideCount) {
|
897
|
+
_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
|
898
|
+
verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
|
899
|
+
}
|
900
|
+
}
|
899
901
|
|
900
|
-
|
902
|
+
if (_.slideCount <= _.options.slidesToShow) {
|
903
|
+
_.slideOffset = 0;
|
904
|
+
verticalOffset = 0;
|
905
|
+
}
|
901
906
|
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
max = _.slideCount * 2;
|
909
|
-
}
|
907
|
+
if (_.options.centerMode === true && _.options.infinite === true) {
|
908
|
+
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
|
909
|
+
} else if (_.options.centerMode === true) {
|
910
|
+
_.slideOffset = 0;
|
911
|
+
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
|
912
|
+
}
|
910
913
|
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
914
|
+
if (_.options.vertical === false) {
|
915
|
+
targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
|
916
|
+
} else {
|
917
|
+
targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
|
918
|
+
}
|
916
919
|
|
917
|
-
|
920
|
+
if (_.options.variableWidth === true) {
|
918
921
|
|
919
|
-
|
922
|
+
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
|
923
|
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
924
|
+
} else {
|
925
|
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
|
926
|
+
}
|
920
927
|
|
921
|
-
|
928
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
922
929
|
|
923
|
-
|
930
|
+
if (_.options.centerMode === true) {
|
931
|
+
if (_.options.infinite === false) {
|
932
|
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
933
|
+
} else {
|
934
|
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
|
935
|
+
}
|
936
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
937
|
+
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
|
938
|
+
}
|
939
|
+
}
|
924
940
|
|
925
|
-
|
941
|
+
return targetLeft;
|
926
942
|
|
927
|
-
|
943
|
+
};
|
928
944
|
|
929
|
-
|
945
|
+
Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
|
930
946
|
|
931
|
-
|
947
|
+
var _ = this;
|
932
948
|
|
933
|
-
|
934
|
-
_.$slideTrack.find('.slick-slide').each(function(index, slide){
|
935
|
-
if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
|
936
|
-
swipedSlide = slide;
|
937
|
-
return false;
|
938
|
-
}
|
939
|
-
});
|
949
|
+
return _.options[option];
|
940
950
|
|
941
|
-
|
951
|
+
};
|
942
952
|
|
943
|
-
|
953
|
+
Slick.prototype.getNavigableIndexes = function() {
|
944
954
|
|
945
|
-
|
946
|
-
|
947
|
-
|
955
|
+
var _ = this,
|
956
|
+
breakPoint = 0,
|
957
|
+
counter = 0,
|
958
|
+
indexes = [],
|
959
|
+
max;
|
948
960
|
|
949
|
-
|
961
|
+
if (_.options.infinite === false) {
|
962
|
+
max = _.slideCount - _.options.slidesToShow + 1;
|
963
|
+
if (_.options.centerMode === true) max = _.slideCount;
|
964
|
+
} else {
|
965
|
+
breakPoint = _.options.slidesToScroll * -1;
|
966
|
+
counter = _.options.slidesToScroll * -1;
|
967
|
+
max = _.slideCount * 2;
|
968
|
+
}
|
950
969
|
|
951
|
-
|
970
|
+
while (breakPoint < max) {
|
971
|
+
indexes.push(breakPoint);
|
972
|
+
breakPoint = counter + _.options.slidesToScroll;
|
973
|
+
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
974
|
+
}
|
952
975
|
|
953
|
-
|
976
|
+
return indexes;
|
954
977
|
|
955
|
-
|
956
|
-
data: {
|
957
|
-
message: 'index',
|
958
|
-
index: parseInt(slide)
|
959
|
-
}
|
960
|
-
}, dontAnimate);
|
978
|
+
};
|
961
979
|
|
962
|
-
|
980
|
+
Slick.prototype.getSlick = function() {
|
963
981
|
|
964
|
-
|
982
|
+
return this;
|
965
983
|
|
966
|
-
|
984
|
+
};
|
967
985
|
|
968
|
-
|
986
|
+
Slick.prototype.getSlideCount = function() {
|
969
987
|
|
970
|
-
|
971
|
-
|
972
|
-
_.setProps();
|
973
|
-
_.startLoad();
|
974
|
-
_.loadSlider();
|
975
|
-
_.initializeEvents();
|
976
|
-
_.updateArrows();
|
977
|
-
_.updateDots();
|
978
|
-
}
|
988
|
+
var _ = this,
|
989
|
+
slidesTraversed, swipedSlide, centerOffset;
|
979
990
|
|
980
|
-
|
991
|
+
centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
|
981
992
|
|
982
|
-
|
993
|
+
if (_.options.swipeToSlide === true) {
|
994
|
+
_.$slideTrack.find('.slick-slide').each(function(index, slide) {
|
995
|
+
if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
|
996
|
+
swipedSlide = slide;
|
997
|
+
return false;
|
998
|
+
}
|
999
|
+
});
|
983
1000
|
|
984
|
-
|
1001
|
+
slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
|
985
1002
|
|
986
|
-
|
1003
|
+
return slidesTraversed;
|
987
1004
|
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
}, _.changeSlide);
|
992
|
-
_.$nextArrow.on('click.slick', {
|
993
|
-
message: 'next'
|
994
|
-
}, _.changeSlide);
|
995
|
-
}
|
1005
|
+
} else {
|
1006
|
+
return _.options.slidesToScroll;
|
1007
|
+
}
|
996
1008
|
|
997
|
-
|
1009
|
+
};
|
998
1010
|
|
999
|
-
|
1011
|
+
Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
|
1000
1012
|
|
1001
|
-
|
1013
|
+
var _ = this;
|
1002
1014
|
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1015
|
+
_.changeSlide({
|
1016
|
+
data: {
|
1017
|
+
message: 'index',
|
1018
|
+
index: parseInt(slide)
|
1019
|
+
}
|
1020
|
+
}, dontAnimate);
|
1008
1021
|
|
1009
|
-
|
1010
|
-
$('li', _.$dots)
|
1011
|
-
.on('mouseenter.slick', function(){
|
1012
|
-
_.paused = true;
|
1013
|
-
_.autoPlayClear();
|
1014
|
-
})
|
1015
|
-
.on('mouseleave.slick', function(){
|
1016
|
-
_.paused = false;
|
1017
|
-
_.autoPlay();
|
1018
|
-
});
|
1019
|
-
}
|
1022
|
+
};
|
1020
1023
|
|
1021
|
-
|
1024
|
+
Slick.prototype.init = function() {
|
1022
1025
|
|
1023
|
-
|
1026
|
+
var _ = this;
|
1024
1027
|
|
1025
|
-
|
1028
|
+
if (!$(_.$slider).hasClass('slick-initialized')) {
|
1026
1029
|
|
1027
|
-
|
1030
|
+
$(_.$slider).addClass('slick-initialized');
|
1031
|
+
_.buildOut();
|
1032
|
+
_.setProps();
|
1033
|
+
_.startLoad();
|
1034
|
+
_.loadSlider();
|
1035
|
+
_.initializeEvents();
|
1036
|
+
_.updateArrows();
|
1037
|
+
_.updateDots();
|
1038
|
+
}
|
1028
1039
|
|
1029
|
-
|
1040
|
+
_.$slider.trigger('init', [_]);
|
1030
1041
|
|
1031
|
-
|
1032
|
-
action: 'start'
|
1033
|
-
}, _.swipeHandler);
|
1034
|
-
_.$list.on('touchmove.slick mousemove.slick', {
|
1035
|
-
action: 'move'
|
1036
|
-
}, _.swipeHandler);
|
1037
|
-
_.$list.on('touchend.slick mouseup.slick', {
|
1038
|
-
action: 'end'
|
1039
|
-
}, _.swipeHandler);
|
1040
|
-
_.$list.on('touchcancel.slick mouseleave.slick', {
|
1041
|
-
action: 'end'
|
1042
|
-
}, _.swipeHandler);
|
1042
|
+
};
|
1043
1043
|
|
1044
|
-
|
1044
|
+
Slick.prototype.initArrowEvents = function() {
|
1045
1045
|
|
1046
|
-
|
1046
|
+
var _ = this;
|
1047
1047
|
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1048
|
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
1049
|
+
_.$prevArrow.on('click.slick', {
|
1050
|
+
message: 'previous'
|
1051
|
+
}, _.changeSlide);
|
1052
|
+
_.$nextArrow.on('click.slick', {
|
1053
|
+
message: 'next'
|
1054
|
+
}, _.changeSlide);
|
1055
|
+
}
|
1051
1056
|
|
1052
|
-
|
1057
|
+
};
|
1053
1058
|
|
1054
|
-
|
1055
|
-
_.paused = true;
|
1056
|
-
_.autoPlayClear();
|
1057
|
-
});
|
1058
|
-
_.$list.on('mouseleave.slick', function(){
|
1059
|
-
_.paused = false;
|
1060
|
-
_.autoPlay();
|
1061
|
-
});
|
1059
|
+
Slick.prototype.initDotEvents = function() {
|
1062
1060
|
|
1063
|
-
|
1061
|
+
var _ = this;
|
1064
1062
|
|
1065
|
-
|
1063
|
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
1064
|
+
$('li', _.$dots).on('click.slick', {
|
1065
|
+
message: 'index'
|
1066
|
+
}, _.changeSlide);
|
1067
|
+
}
|
1066
1068
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1069
|
+
if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) {
|
1070
|
+
$('li', _.$dots)
|
1071
|
+
.on('mouseenter.slick', _.setPaused.bind(_, true))
|
1072
|
+
.on('mouseleave.slick', _.setPaused.bind(_, false));
|
1073
|
+
}
|
1070
1074
|
|
1071
|
-
|
1072
|
-
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1073
|
-
}
|
1075
|
+
};
|
1074
1076
|
|
1075
|
-
|
1076
|
-
_.checkResponsive();
|
1077
|
-
_.setPosition();
|
1078
|
-
});
|
1077
|
+
Slick.prototype.initializeEvents = function() {
|
1079
1078
|
|
1080
|
-
|
1081
|
-
if ($(window).width() !== _.windowWidth) {
|
1082
|
-
clearTimeout(_.windowDelay);
|
1083
|
-
_.windowDelay = window.setTimeout(function() {
|
1084
|
-
_.windowWidth = $(window).width();
|
1085
|
-
_.checkResponsive();
|
1086
|
-
_.setPosition();
|
1087
|
-
}, 50);
|
1088
|
-
}
|
1089
|
-
});
|
1079
|
+
var _ = this;
|
1090
1080
|
|
1091
|
-
|
1081
|
+
_.initArrowEvents();
|
1092
1082
|
|
1093
|
-
|
1094
|
-
$(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
|
1083
|
+
_.initDotEvents();
|
1095
1084
|
|
1096
|
-
|
1085
|
+
_.$list.on('touchstart.slick mousedown.slick', {
|
1086
|
+
action: 'start'
|
1087
|
+
}, _.swipeHandler);
|
1088
|
+
_.$list.on('touchmove.slick mousemove.slick', {
|
1089
|
+
action: 'move'
|
1090
|
+
}, _.swipeHandler);
|
1091
|
+
_.$list.on('touchend.slick mouseup.slick', {
|
1092
|
+
action: 'end'
|
1093
|
+
}, _.swipeHandler);
|
1094
|
+
_.$list.on('touchcancel.slick mouseleave.slick', {
|
1095
|
+
action: 'end'
|
1096
|
+
}, _.swipeHandler);
|
1097
1097
|
|
1098
|
-
|
1098
|
+
_.$list.on('click.slick', _.clickHandler);
|
1099
1099
|
|
1100
|
-
|
1100
|
+
if (_.options.autoplay === true) {
|
1101
|
+
$(document).on(_.visibilityChange, _.visibility.bind(_));
|
1102
|
+
}
|
1101
1103
|
|
1102
|
-
|
1104
|
+
_.$list.on('mouseenter.slick', _.setPaused.bind(_, true));
|
1105
|
+
_.$list.on('mouseleave.slick', _.setPaused.bind(_, false));
|
1103
1106
|
|
1104
|
-
|
1105
|
-
|
1107
|
+
if (_.options.accessibility === true) {
|
1108
|
+
_.$list.on('keydown.slick', _.keyHandler);
|
1109
|
+
}
|
1106
1110
|
|
1107
|
-
|
1111
|
+
if (_.options.focusOnSelect === true) {
|
1112
|
+
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1113
|
+
}
|
1108
1114
|
|
1109
|
-
|
1115
|
+
$(window).on('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange.bind(_));
|
1110
1116
|
|
1111
|
-
|
1117
|
+
$(window).on('resize.slick.slick-' + _.instanceUid, _.resize.bind(_));
|
1112
1118
|
|
1113
|
-
|
1119
|
+
$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
|
1114
1120
|
|
1115
|
-
|
1121
|
+
$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
|
1122
|
+
$(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
|
1116
1123
|
|
1117
|
-
|
1124
|
+
};
|
1118
1125
|
|
1119
|
-
|
1126
|
+
Slick.prototype.initUI = function() {
|
1120
1127
|
|
1121
|
-
|
1128
|
+
var _ = this;
|
1122
1129
|
|
1123
|
-
|
1130
|
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
1124
1131
|
|
1125
|
-
|
1132
|
+
_.$prevArrow.show();
|
1133
|
+
_.$nextArrow.show();
|
1126
1134
|
|
1127
|
-
if (event.keyCode === 37 && _.options.accessibility === true) {
|
1128
|
-
_.changeSlide({
|
1129
|
-
data: {
|
1130
|
-
message: 'previous'
|
1131
1135
|
}
|
1132
|
-
});
|
1133
|
-
} else if (event.keyCode === 39 && _.options.accessibility === true) {
|
1134
|
-
_.changeSlide({
|
1135
|
-
data: {
|
1136
|
-
message: 'next'
|
1137
|
-
}
|
1138
|
-
});
|
1139
|
-
}
|
1140
1136
|
|
1141
|
-
|
1137
|
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
1142
1138
|
|
1143
|
-
|
1139
|
+
_.$dots.show();
|
1144
1140
|
|
1145
|
-
|
1146
|
-
loadRange, cloneRange, rangeStart, rangeEnd;
|
1141
|
+
}
|
1147
1142
|
|
1148
|
-
|
1149
|
-
$('img[data-lazy]', imagesScope).each(function() {
|
1150
|
-
var image = $(this),
|
1151
|
-
imageSource = $(this).attr('data-lazy');
|
1143
|
+
if (_.options.autoplay === true) {
|
1152
1144
|
|
1153
|
-
|
1154
|
-
.load(function() { image.animate({ opacity: 1 }, 200); })
|
1155
|
-
.css({ opacity: 0 })
|
1156
|
-
.attr('src', imageSource)
|
1157
|
-
.removeAttr('data-lazy')
|
1158
|
-
.removeClass('slick-loading');
|
1159
|
-
});
|
1160
|
-
}
|
1145
|
+
_.autoPlay();
|
1161
1146
|
|
1162
|
-
|
1163
|
-
if (_.options.infinite === true) {
|
1164
|
-
rangeStart = _.currentSlide + (_.options.slidesToShow/2 + 1);
|
1165
|
-
rangeEnd = rangeStart + _.options.slidesToShow + 2;
|
1166
|
-
} else {
|
1167
|
-
rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow/2 + 1));
|
1168
|
-
rangeEnd = 2 + (_.options.slidesToShow/2 + 1) + _.currentSlide;
|
1169
|
-
}
|
1170
|
-
} else {
|
1171
|
-
rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
|
1172
|
-
rangeEnd = rangeStart + _.options.slidesToShow;
|
1173
|
-
if (_.options.fade === true ) {
|
1174
|
-
if(rangeStart > 0) rangeStart--;
|
1175
|
-
if(rangeEnd <= _.slideCount) rangeEnd++;
|
1176
|
-
}
|
1177
|
-
}
|
1147
|
+
}
|
1178
1148
|
|
1179
|
-
|
1180
|
-
loadImages(loadRange);
|
1181
|
-
|
1182
|
-
if (_.slideCount <= _.options.slidesToShow){
|
1183
|
-
cloneRange = _.$slider.find('.slick-slide');
|
1184
|
-
loadImages(cloneRange);
|
1185
|
-
}else
|
1186
|
-
if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
|
1187
|
-
cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
|
1188
|
-
loadImages(cloneRange);
|
1189
|
-
} else if (_.currentSlide === 0) {
|
1190
|
-
cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
|
1191
|
-
loadImages(cloneRange);
|
1192
|
-
}
|
1149
|
+
};
|
1193
1150
|
|
1194
|
-
|
1151
|
+
Slick.prototype.keyHandler = function(event) {
|
1195
1152
|
|
1196
|
-
|
1153
|
+
var _ = this;
|
1197
1154
|
|
1198
|
-
|
1155
|
+
if (event.keyCode === 37 && _.options.accessibility === true) {
|
1156
|
+
_.changeSlide({
|
1157
|
+
data: {
|
1158
|
+
message: 'previous'
|
1159
|
+
}
|
1160
|
+
});
|
1161
|
+
} else if (event.keyCode === 39 && _.options.accessibility === true) {
|
1162
|
+
_.changeSlide({
|
1163
|
+
data: {
|
1164
|
+
message: 'next'
|
1165
|
+
}
|
1166
|
+
});
|
1167
|
+
}
|
1199
1168
|
|
1200
|
-
|
1169
|
+
};
|
1170
|
+
|
1171
|
+
Slick.prototype.lazyLoad = function() {
|
1172
|
+
|
1173
|
+
var _ = this,
|
1174
|
+
loadRange, cloneRange, rangeStart, rangeEnd;
|
1175
|
+
|
1176
|
+
function loadImages(imagesScope) {
|
1177
|
+
$('img[data-lazy]', imagesScope).each(function() {
|
1178
|
+
var image = $(this),
|
1179
|
+
imageSource = $(this).attr('data-lazy');
|
1180
|
+
|
1181
|
+
image
|
1182
|
+
.load(function() {
|
1183
|
+
image.animate({
|
1184
|
+
opacity: 1
|
1185
|
+
}, 200);
|
1186
|
+
})
|
1187
|
+
.css({
|
1188
|
+
opacity: 0
|
1189
|
+
})
|
1190
|
+
.attr('src', imageSource)
|
1191
|
+
.removeAttr('data-lazy')
|
1192
|
+
.removeClass('slick-loading');
|
1193
|
+
});
|
1194
|
+
}
|
1201
1195
|
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1196
|
+
if (_.options.centerMode === true) {
|
1197
|
+
if (_.options.infinite === true) {
|
1198
|
+
rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
|
1199
|
+
rangeEnd = rangeStart + _.options.slidesToShow + 2;
|
1200
|
+
} else {
|
1201
|
+
rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
|
1202
|
+
rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
|
1203
|
+
}
|
1204
|
+
} else {
|
1205
|
+
rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
|
1206
|
+
rangeEnd = rangeStart + _.options.slidesToShow;
|
1207
|
+
if (_.options.fade === true) {
|
1208
|
+
if (rangeStart > 0) rangeStart--;
|
1209
|
+
if (rangeEnd <= _.slideCount) rangeEnd++;
|
1210
|
+
}
|
1211
|
+
}
|
1205
1212
|
|
1206
|
-
|
1213
|
+
loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
|
1214
|
+
loadImages(loadRange);
|
1215
|
+
|
1216
|
+
if (_.slideCount <= _.options.slidesToShow) {
|
1217
|
+
cloneRange = _.$slider.find('.slick-slide');
|
1218
|
+
loadImages(cloneRange);
|
1219
|
+
} else
|
1220
|
+
if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
|
1221
|
+
cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
|
1222
|
+
loadImages(cloneRange);
|
1223
|
+
} else if (_.currentSlide === 0) {
|
1224
|
+
cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
|
1225
|
+
loadImages(cloneRange);
|
1226
|
+
}
|
1207
1227
|
|
1208
|
-
|
1228
|
+
};
|
1209
1229
|
|
1210
|
-
|
1211
|
-
_.progressiveLazyLoad();
|
1212
|
-
}
|
1230
|
+
Slick.prototype.loadSlider = function() {
|
1213
1231
|
|
1214
|
-
|
1232
|
+
var _ = this;
|
1215
1233
|
|
1216
|
-
|
1234
|
+
_.setPosition();
|
1217
1235
|
|
1218
|
-
|
1236
|
+
_.$slideTrack.css({
|
1237
|
+
opacity: 1
|
1238
|
+
});
|
1219
1239
|
|
1220
|
-
|
1221
|
-
data: {
|
1222
|
-
message: 'next'
|
1223
|
-
}
|
1224
|
-
});
|
1240
|
+
_.$slider.removeClass('slick-loading');
|
1225
1241
|
|
1226
|
-
|
1242
|
+
_.initUI();
|
1227
1243
|
|
1228
|
-
|
1244
|
+
if (_.options.lazyLoad === 'progressive') {
|
1245
|
+
_.progressiveLazyLoad();
|
1246
|
+
}
|
1229
1247
|
|
1230
|
-
|
1248
|
+
};
|
1231
1249
|
|
1232
|
-
|
1233
|
-
_.paused = true;
|
1250
|
+
Slick.prototype.next = Slick.prototype.slickNext = function() {
|
1234
1251
|
|
1235
|
-
|
1252
|
+
var _ = this;
|
1236
1253
|
|
1237
|
-
|
1254
|
+
_.changeSlide({
|
1255
|
+
data: {
|
1256
|
+
message: 'next'
|
1257
|
+
}
|
1258
|
+
});
|
1238
1259
|
|
1239
|
-
|
1260
|
+
};
|
1240
1261
|
|
1241
|
-
|
1242
|
-
_.autoPlay();
|
1262
|
+
Slick.prototype.orientationChange = function() {
|
1243
1263
|
|
1244
|
-
|
1264
|
+
var _ = this;
|
1245
1265
|
|
1246
|
-
|
1266
|
+
_.checkResponsive();
|
1267
|
+
_.setPosition();
|
1247
1268
|
|
1248
|
-
|
1269
|
+
};
|
1249
1270
|
|
1250
|
-
|
1271
|
+
Slick.prototype.pause = Slick.prototype.slickPause = function() {
|
1251
1272
|
|
1252
|
-
|
1273
|
+
var _ = this;
|
1253
1274
|
|
1254
|
-
|
1275
|
+
_.autoPlayClear();
|
1276
|
+
_.paused = true;
|
1255
1277
|
|
1256
|
-
|
1278
|
+
};
|
1257
1279
|
|
1258
|
-
|
1259
|
-
_.autoPlay();
|
1260
|
-
}
|
1280
|
+
Slick.prototype.play = Slick.prototype.slickPlay = function() {
|
1261
1281
|
|
1262
|
-
|
1282
|
+
var _ = this;
|
1263
1283
|
|
1264
|
-
|
1284
|
+
_.paused = false;
|
1285
|
+
_.autoPlay();
|
1265
1286
|
|
1266
|
-
|
1287
|
+
};
|
1267
1288
|
|
1268
|
-
|
1269
|
-
data: {
|
1270
|
-
message: 'previous'
|
1271
|
-
}
|
1272
|
-
});
|
1289
|
+
Slick.prototype.postSlide = function(index) {
|
1273
1290
|
|
1274
|
-
|
1291
|
+
var _ = this;
|
1275
1292
|
|
1276
|
-
|
1293
|
+
_.$slider.trigger('afterChange', [_, index]);
|
1277
1294
|
|
1278
|
-
|
1279
|
-
imgCount, targetImage;
|
1295
|
+
_.animating = false;
|
1280
1296
|
|
1281
|
-
|
1297
|
+
_.setPosition();
|
1282
1298
|
|
1283
|
-
|
1284
|
-
targetImage = $('img[data-lazy]', _.$slider).first();
|
1285
|
-
targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
|
1286
|
-
targetImage.removeAttr('data-lazy');
|
1287
|
-
_.progressiveLazyLoad();
|
1299
|
+
_.swipeLeft = null;
|
1288
1300
|
|
1289
|
-
if(
|
1290
|
-
|
1301
|
+
if (_.options.autoplay === true && _.paused === false) {
|
1302
|
+
_.autoPlay();
|
1291
1303
|
}
|
1292
|
-
})
|
1293
|
-
.error(function () {
|
1294
|
-
targetImage.removeAttr('data-lazy');
|
1295
|
-
_.progressiveLazyLoad();
|
1296
|
-
});
|
1297
|
-
}
|
1298
1304
|
|
1299
|
-
|
1305
|
+
};
|
1300
1306
|
|
1301
|
-
|
1307
|
+
Slick.prototype.prev = Slick.prototype.slickPrev = function() {
|
1302
1308
|
|
1303
|
-
|
1304
|
-
currentSlide = _.currentSlide;
|
1309
|
+
var _ = this;
|
1305
1310
|
|
1306
|
-
|
1311
|
+
_.changeSlide({
|
1312
|
+
data: {
|
1313
|
+
message: 'previous'
|
1314
|
+
}
|
1315
|
+
});
|
1307
1316
|
|
1308
|
-
|
1317
|
+
};
|
1309
1318
|
|
1310
|
-
|
1319
|
+
Slick.prototype.preventDefault = function(e) {
|
1320
|
+
e.preventDefault();
|
1321
|
+
};
|
1311
1322
|
|
1312
|
-
|
1313
|
-
data: {
|
1314
|
-
message: 'index',
|
1315
|
-
index: currentSlide
|
1316
|
-
}
|
1317
|
-
}, true);
|
1323
|
+
Slick.prototype.progressiveLazyLoad = function() {
|
1318
1324
|
|
1319
|
-
|
1325
|
+
var _ = this,
|
1326
|
+
imgCount, targetImage;
|
1320
1327
|
|
1321
|
-
|
1328
|
+
imgCount = $('img[data-lazy]', _.$slider).length;
|
1322
1329
|
|
1323
|
-
|
1330
|
+
if (imgCount > 0) {
|
1331
|
+
targetImage = $('img[data-lazy]', _.$slider).first();
|
1332
|
+
targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
|
1333
|
+
targetImage.removeAttr('data-lazy');
|
1334
|
+
_.progressiveLazyLoad();
|
1324
1335
|
|
1325
|
-
|
1326
|
-
|
1336
|
+
if (_.options.adaptiveHeight === true) {
|
1337
|
+
_.setPosition();
|
1338
|
+
}
|
1339
|
+
})
|
1340
|
+
.error(function() {
|
1341
|
+
targetImage.removeAttr('data-lazy');
|
1342
|
+
_.progressiveLazyLoad();
|
1343
|
+
});
|
1344
|
+
}
|
1327
1345
|
|
1328
|
-
|
1346
|
+
};
|
1329
1347
|
|
1330
|
-
|
1331
|
-
_.currentSlide = _.currentSlide - _.options.slidesToScroll;
|
1332
|
-
}
|
1348
|
+
Slick.prototype.refresh = function() {
|
1333
1349
|
|
1334
|
-
|
1335
|
-
|
1336
|
-
}
|
1350
|
+
var _ = this,
|
1351
|
+
currentSlide = _.currentSlide;
|
1337
1352
|
|
1338
|
-
|
1353
|
+
_.destroy();
|
1339
1354
|
|
1340
|
-
|
1355
|
+
$.extend(_, _.initials);
|
1341
1356
|
|
1342
|
-
|
1357
|
+
_.init();
|
1343
1358
|
|
1344
|
-
|
1359
|
+
_.changeSlide({
|
1360
|
+
data: {
|
1361
|
+
message: 'index',
|
1362
|
+
index: currentSlide
|
1363
|
+
}
|
1364
|
+
}, true);
|
1345
1365
|
|
1346
|
-
|
1366
|
+
};
|
1347
1367
|
|
1348
|
-
|
1368
|
+
Slick.prototype.reinit = function() {
|
1349
1369
|
|
1350
|
-
|
1370
|
+
var _ = this;
|
1351
1371
|
|
1352
|
-
|
1372
|
+
_.$slides = _.$slideTrack.children(_.options.slide).addClass(
|
1373
|
+
'slick-slide');
|
1353
1374
|
|
1354
|
-
|
1355
|
-
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1356
|
-
}
|
1375
|
+
_.slideCount = _.$slides.length;
|
1357
1376
|
|
1358
|
-
|
1377
|
+
if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
|
1378
|
+
_.currentSlide = _.currentSlide - _.options.slidesToScroll;
|
1379
|
+
}
|
1359
1380
|
|
1360
|
-
|
1381
|
+
if (_.slideCount <= _.options.slidesToShow) {
|
1382
|
+
_.currentSlide = 0;
|
1383
|
+
}
|
1361
1384
|
|
1362
|
-
|
1385
|
+
_.setProps();
|
1363
1386
|
|
1364
|
-
|
1387
|
+
_.setupInfinite();
|
1365
1388
|
|
1366
|
-
|
1389
|
+
_.buildArrows();
|
1367
1390
|
|
1368
|
-
|
1391
|
+
_.updateArrows();
|
1369
1392
|
|
1370
|
-
|
1371
|
-
removeBefore = index;
|
1372
|
-
index = removeBefore === true ? 0 : _.slideCount - 1;
|
1373
|
-
} else {
|
1374
|
-
index = removeBefore === true ? --index : index;
|
1375
|
-
}
|
1393
|
+
_.initArrowEvents();
|
1376
1394
|
|
1377
|
-
|
1378
|
-
return false;
|
1379
|
-
}
|
1395
|
+
_.buildDots();
|
1380
1396
|
|
1381
|
-
|
1397
|
+
_.updateDots();
|
1382
1398
|
|
1383
|
-
|
1384
|
-
_.$slideTrack.children().remove();
|
1385
|
-
} else {
|
1386
|
-
_.$slideTrack.children(this.options.slide).eq(index).remove();
|
1387
|
-
}
|
1399
|
+
_.initDotEvents();
|
1388
1400
|
|
1389
|
-
|
1401
|
+
if (_.options.focusOnSelect === true) {
|
1402
|
+
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1403
|
+
}
|
1390
1404
|
|
1391
|
-
|
1405
|
+
_.setSlideClasses(0);
|
1392
1406
|
|
1393
|
-
|
1407
|
+
_.setPosition();
|
1394
1408
|
|
1395
|
-
|
1409
|
+
_.$slider.trigger('reInit', [_]);
|
1396
1410
|
|
1397
|
-
|
1411
|
+
};
|
1398
1412
|
|
1399
|
-
|
1413
|
+
Slick.prototype.resize = function() {
|
1400
1414
|
|
1401
|
-
|
1415
|
+
var _ = this;
|
1402
1416
|
|
1403
|
-
|
1404
|
-
|
1417
|
+
if ($(window).width() !== _.windowWidth) {
|
1418
|
+
clearTimeout(_.windowDelay);
|
1419
|
+
_.windowDelay = window.setTimeout(function() {
|
1420
|
+
_.windowWidth = $(window).width();
|
1421
|
+
_.checkResponsive();
|
1422
|
+
_.setPosition();
|
1423
|
+
}, 50);
|
1424
|
+
}
|
1425
|
+
};
|
1405
1426
|
|
1406
|
-
|
1407
|
-
position = -position;
|
1408
|
-
}
|
1409
|
-
x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
|
1410
|
-
y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
|
1427
|
+
Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
|
1411
1428
|
|
1412
|
-
|
1429
|
+
var _ = this;
|
1413
1430
|
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
_.$slideTrack.css(positionProps);
|
1421
|
-
} else {
|
1422
|
-
positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
|
1423
|
-
_.$slideTrack.css(positionProps);
|
1424
|
-
}
|
1425
|
-
}
|
1431
|
+
if (typeof(index) === 'boolean') {
|
1432
|
+
removeBefore = index;
|
1433
|
+
index = removeBefore === true ? 0 : _.slideCount - 1;
|
1434
|
+
} else {
|
1435
|
+
index = removeBefore === true ? --index : index;
|
1436
|
+
}
|
1426
1437
|
|
1427
|
-
|
1438
|
+
if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
|
1439
|
+
return false;
|
1440
|
+
}
|
1428
1441
|
|
1429
|
-
|
1442
|
+
_.unload();
|
1430
1443
|
|
1431
|
-
|
1444
|
+
if (removeAll === true) {
|
1445
|
+
_.$slideTrack.children().remove();
|
1446
|
+
} else {
|
1447
|
+
_.$slideTrack.children(this.options.slide).eq(index).remove();
|
1448
|
+
}
|
1432
1449
|
|
1433
|
-
|
1434
|
-
if (_.options.centerMode === true) {
|
1435
|
-
_.$list.css({
|
1436
|
-
padding: ('0px ' + _.options.centerPadding)
|
1437
|
-
});
|
1438
|
-
}
|
1439
|
-
} else {
|
1440
|
-
_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
|
1441
|
-
if (_.options.centerMode === true) {
|
1442
|
-
_.$list.css({
|
1443
|
-
padding: (_.options.centerPadding + ' 0px')
|
1444
|
-
});
|
1445
|
-
}
|
1446
|
-
}
|
1450
|
+
_.$slides = _.$slideTrack.children(this.options.slide);
|
1447
1451
|
|
1448
|
-
|
1449
|
-
_.listHeight = _.$list.height();
|
1452
|
+
_.$slideTrack.children(this.options.slide).detach();
|
1450
1453
|
|
1454
|
+
_.$slideTrack.append(_.$slides);
|
1451
1455
|
|
1452
|
-
|
1453
|
-
_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
|
1454
|
-
_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
|
1456
|
+
_.$slidesCache = _.$slides;
|
1455
1457
|
|
1456
|
-
|
1457
|
-
var trackWidth = 0;
|
1458
|
-
_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
|
1459
|
-
_.$slideTrack.children('.slick-slide').each(function(){
|
1460
|
-
trackWidth += _.listWidth;
|
1461
|
-
});
|
1462
|
-
_.$slideTrack.width(Math.ceil(trackWidth) + 1);
|
1463
|
-
} else {
|
1464
|
-
_.slideWidth = Math.ceil(_.listWidth);
|
1465
|
-
_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
|
1466
|
-
}
|
1458
|
+
_.reinit();
|
1467
1459
|
|
1468
|
-
|
1469
|
-
if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
|
1460
|
+
};
|
1470
1461
|
|
1471
|
-
|
1462
|
+
Slick.prototype.setCSS = function(position) {
|
1472
1463
|
|
1473
|
-
|
1464
|
+
var _ = this,
|
1465
|
+
positionProps = {},
|
1466
|
+
x, y;
|
1474
1467
|
|
1475
|
-
|
1476
|
-
|
1468
|
+
if (_.options.rtl === true) {
|
1469
|
+
position = -position;
|
1470
|
+
}
|
1471
|
+
x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
|
1472
|
+
y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
|
1477
1473
|
|
1478
|
-
|
1479
|
-
targetLeft = (_.slideWidth * index) * -1;
|
1480
|
-
if (_.options.rtl === true) {
|
1481
|
-
$(element).css({
|
1482
|
-
position: 'relative',
|
1483
|
-
right: targetLeft,
|
1484
|
-
top: 0,
|
1485
|
-
zIndex: 800,
|
1486
|
-
opacity: 0
|
1487
|
-
});
|
1488
|
-
} else {
|
1489
|
-
$(element).css({
|
1490
|
-
position: 'relative',
|
1491
|
-
left: targetLeft,
|
1492
|
-
top: 0,
|
1493
|
-
zIndex: 800,
|
1494
|
-
opacity: 0
|
1495
|
-
});
|
1496
|
-
}
|
1497
|
-
});
|
1474
|
+
positionProps[_.positionProp] = position;
|
1498
1475
|
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1476
|
+
if (_.transformsEnabled === false) {
|
1477
|
+
_.$slideTrack.css(positionProps);
|
1478
|
+
} else {
|
1479
|
+
positionProps = {};
|
1480
|
+
if (_.cssTransitions === false) {
|
1481
|
+
positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
|
1482
|
+
_.$slideTrack.css(positionProps);
|
1483
|
+
} else {
|
1484
|
+
positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
|
1485
|
+
_.$slideTrack.css(positionProps);
|
1486
|
+
}
|
1487
|
+
}
|
1503
1488
|
|
1504
|
-
|
1489
|
+
};
|
1505
1490
|
|
1506
|
-
|
1491
|
+
Slick.prototype.setDimensions = function() {
|
1507
1492
|
|
1508
|
-
|
1493
|
+
var _ = this;
|
1509
1494
|
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1495
|
+
if (_.options.vertical === false) {
|
1496
|
+
if (_.options.centerMode === true) {
|
1497
|
+
_.$list.css({
|
1498
|
+
padding: ('0px ' + _.options.centerPadding)
|
1499
|
+
});
|
1500
|
+
}
|
1501
|
+
} else {
|
1502
|
+
_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
|
1503
|
+
if (_.options.centerMode === true) {
|
1504
|
+
_.$list.css({
|
1505
|
+
padding: (_.options.centerPadding + ' 0px')
|
1506
|
+
});
|
1507
|
+
}
|
1508
|
+
}
|
1514
1509
|
|
1515
|
-
|
1510
|
+
_.listWidth = _.$list.width();
|
1511
|
+
_.listHeight = _.$list.height();
|
1516
1512
|
|
1517
|
-
Slick.prototype.setOption = Slick.prototype.slickSetOption = function(option, value, refresh) {
|
1518
1513
|
|
1519
|
-
|
1520
|
-
|
1514
|
+
if (_.options.vertical === false && _.options.variableWidth === false) {
|
1515
|
+
_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
|
1516
|
+
_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
|
1521
1517
|
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1518
|
+
} else if (_.options.variableWidth === true) {
|
1519
|
+
_.$slideTrack.width(5000 * _.slideCount);
|
1520
|
+
} else {
|
1521
|
+
_.slideWidth = Math.ceil(_.listWidth);
|
1522
|
+
_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
|
1523
|
+
}
|
1526
1524
|
|
1527
|
-
|
1525
|
+
var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
|
1526
|
+
if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
|
1528
1527
|
|
1529
|
-
|
1528
|
+
};
|
1530
1529
|
|
1531
|
-
|
1530
|
+
Slick.prototype.setFade = function() {
|
1532
1531
|
|
1533
|
-
|
1532
|
+
var _ = this,
|
1533
|
+
targetLeft;
|
1534
1534
|
|
1535
|
-
|
1535
|
+
_.$slides.each(function(index, element) {
|
1536
|
+
targetLeft = (_.slideWidth * index) * -1;
|
1537
|
+
if (_.options.rtl === true) {
|
1538
|
+
$(element).css({
|
1539
|
+
position: 'relative',
|
1540
|
+
right: targetLeft,
|
1541
|
+
top: 0,
|
1542
|
+
zIndex: 800,
|
1543
|
+
opacity: 0
|
1544
|
+
});
|
1545
|
+
} else {
|
1546
|
+
$(element).css({
|
1547
|
+
position: 'relative',
|
1548
|
+
left: targetLeft,
|
1549
|
+
top: 0,
|
1550
|
+
zIndex: 800,
|
1551
|
+
opacity: 0
|
1552
|
+
});
|
1553
|
+
}
|
1554
|
+
});
|
1536
1555
|
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
}
|
1556
|
+
_.$slides.eq(_.currentSlide).css({
|
1557
|
+
zIndex: 900,
|
1558
|
+
opacity: 1
|
1559
|
+
});
|
1542
1560
|
|
1543
|
-
|
1561
|
+
};
|
1544
1562
|
|
1545
|
-
|
1563
|
+
Slick.prototype.setHeight = function() {
|
1546
1564
|
|
1547
|
-
|
1565
|
+
var _ = this;
|
1548
1566
|
|
1549
|
-
|
1550
|
-
|
1567
|
+
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
|
1568
|
+
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
|
1569
|
+
_.$list.css('height', targetHeight);
|
1570
|
+
}
|
1551
1571
|
|
1552
|
-
|
1572
|
+
};
|
1553
1573
|
|
1554
|
-
|
1555
|
-
_.$slider.addClass('slick-vertical');
|
1556
|
-
} else {
|
1557
|
-
_.$slider.removeClass('slick-vertical');
|
1558
|
-
}
|
1574
|
+
Slick.prototype.setOption = Slick.prototype.slickSetOption = function(option, value, refresh) {
|
1559
1575
|
|
1560
|
-
|
1561
|
-
|
1562
|
-
bodyStyle.msTransition !== undefined) {
|
1563
|
-
if(_.options.useCSS === true) {
|
1564
|
-
_.cssTransitions = true;
|
1565
|
-
}
|
1566
|
-
}
|
1576
|
+
var _ = this;
|
1577
|
+
_.options[option] = value;
|
1567
1578
|
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
}
|
1574
|
-
|
1575
|
-
|
1576
|
-
_.transformType = "-moz-transform";
|
1577
|
-
_.transitionType = 'MozTransition';
|
1578
|
-
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
|
1579
|
-
}
|
1580
|
-
if (bodyStyle.webkitTransform !== undefined) {
|
1581
|
-
_.animType = 'webkitTransform';
|
1582
|
-
_.transformType = "-webkit-transform";
|
1583
|
-
_.transitionType = 'webkitTransition';
|
1584
|
-
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
|
1585
|
-
}
|
1586
|
-
if (bodyStyle.msTransform !== undefined) {
|
1587
|
-
_.animType = 'msTransform';
|
1588
|
-
_.transformType = "-ms-transform";
|
1589
|
-
_.transitionType = 'msTransition';
|
1590
|
-
if (bodyStyle.msTransform === undefined) _.animType = false;
|
1591
|
-
}
|
1592
|
-
if (bodyStyle.transform !== undefined && _.animType !== false) {
|
1593
|
-
_.animType = 'transform';
|
1594
|
-
_.transformType = "transform";
|
1595
|
-
_.transitionType = 'transition';
|
1596
|
-
}
|
1597
|
-
_.transformsEnabled = (_.animType !== null && _.animType !== false);
|
1579
|
+
if (refresh === true) {
|
1580
|
+
_.unload();
|
1581
|
+
_.reinit();
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
};
|
1585
|
+
|
1586
|
+
Slick.prototype.setPosition = function() {
|
1598
1587
|
|
1599
|
-
|
1588
|
+
var _ = this;
|
1600
1589
|
|
1590
|
+
_.setDimensions();
|
1601
1591
|
|
1602
|
-
|
1592
|
+
_.setHeight();
|
1593
|
+
|
1594
|
+
if (_.options.fade === false) {
|
1595
|
+
_.setCSS(_.getLeft(_.currentSlide));
|
1596
|
+
} else {
|
1597
|
+
_.setFade();
|
1598
|
+
}
|
1603
1599
|
|
1604
|
-
|
1605
|
-
centerOffset, allSlides, indexOffset, remainder;
|
1600
|
+
_.$slider.trigger('setPosition', [_]);
|
1606
1601
|
|
1607
|
-
|
1608
|
-
allSlides = _.$slider.find('.slick-slide');
|
1602
|
+
};
|
1609
1603
|
|
1610
|
-
|
1604
|
+
Slick.prototype.setProps = function() {
|
1611
1605
|
|
1612
|
-
|
1606
|
+
var _ = this,
|
1607
|
+
bodyStyle = document.body.style;
|
1613
1608
|
|
1614
|
-
|
1609
|
+
_.positionProp = _.options.vertical === true ? 'top' : 'left';
|
1615
1610
|
|
1616
|
-
if (
|
1617
|
-
|
1611
|
+
if (_.positionProp === 'top') {
|
1612
|
+
_.$slider.addClass('slick-vertical');
|
1618
1613
|
} else {
|
1619
|
-
|
1620
|
-
allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active').attr("aria-hidden","false");
|
1614
|
+
_.$slider.removeClass('slick-vertical');
|
1621
1615
|
}
|
1622
1616
|
|
1623
|
-
if (
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1617
|
+
if (bodyStyle.WebkitTransition !== undefined ||
|
1618
|
+
bodyStyle.MozTransition !== undefined ||
|
1619
|
+
bodyStyle.msTransition !== undefined) {
|
1620
|
+
if (_.options.useCSS === true) {
|
1621
|
+
_.cssTransitions = true;
|
1622
|
+
}
|
1627
1623
|
}
|
1628
1624
|
|
1629
|
-
|
1625
|
+
if (bodyStyle.OTransform !== undefined) {
|
1626
|
+
_.animType = 'OTransform';
|
1627
|
+
_.transformType = '-o-transform';
|
1628
|
+
_.transitionType = 'OTransition';
|
1629
|
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
|
1630
|
+
}
|
1631
|
+
if (bodyStyle.MozTransform !== undefined) {
|
1632
|
+
_.animType = 'MozTransform';
|
1633
|
+
_.transformType = '-moz-transform';
|
1634
|
+
_.transitionType = 'MozTransition';
|
1635
|
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
|
1636
|
+
}
|
1637
|
+
if (bodyStyle.webkitTransform !== undefined) {
|
1638
|
+
_.animType = 'webkitTransform';
|
1639
|
+
_.transformType = '-webkit-transform';
|
1640
|
+
_.transitionType = 'webkitTransition';
|
1641
|
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
|
1642
|
+
}
|
1643
|
+
if (bodyStyle.msTransform !== undefined) {
|
1644
|
+
_.animType = 'msTransform';
|
1645
|
+
_.transformType = '-ms-transform';
|
1646
|
+
_.transitionType = 'msTransition';
|
1647
|
+
if (bodyStyle.msTransform === undefined) _.animType = false;
|
1648
|
+
}
|
1649
|
+
if (bodyStyle.transform !== undefined && _.animType !== false) {
|
1650
|
+
_.animType = 'transform';
|
1651
|
+
_.transformType = 'transform';
|
1652
|
+
_.transitionType = 'transition';
|
1653
|
+
}
|
1654
|
+
_.transformsEnabled = (_.animType !== null && _.animType !== false);
|
1630
1655
|
|
1631
|
-
|
1656
|
+
};
|
1632
1657
|
|
1633
|
-
} else {
|
1634
1658
|
|
1635
|
-
|
1636
|
-
_.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr("aria-hidden","false");
|
1637
|
-
} else if ( allSlides.length <= _.options.slidesToShow ) {
|
1638
|
-
allSlides.addClass('slick-active').attr("aria-hidden","false");
|
1639
|
-
} else {
|
1640
|
-
remainder = _.slideCount%_.options.slidesToShow;
|
1641
|
-
indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
|
1642
|
-
if(_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
|
1643
|
-
allSlides.slice(indexOffset-(_.options.slidesToShow-remainder), indexOffset + remainder).addClass('slick-active').attr("aria-hidden","false");
|
1644
|
-
} else {
|
1645
|
-
allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr("aria-hidden","false");
|
1646
|
-
}
|
1647
|
-
}
|
1659
|
+
Slick.prototype.setSlideClasses = function(index) {
|
1648
1660
|
|
1649
|
-
|
1661
|
+
var _ = this,
|
1662
|
+
centerOffset, allSlides, indexOffset, remainder;
|
1650
1663
|
|
1651
|
-
|
1652
|
-
|
1653
|
-
}
|
1664
|
+
_.$slider.find('.slick-slide').removeClass('slick-active').attr('aria-hidden', 'true').removeClass('slick-center');
|
1665
|
+
allSlides = _.$slider.find('.slick-slide');
|
1654
1666
|
|
1655
|
-
|
1667
|
+
if (_.options.centerMode === true) {
|
1656
1668
|
|
1657
|
-
|
1669
|
+
centerOffset = Math.floor(_.options.slidesToShow / 2);
|
1658
1670
|
|
1659
|
-
|
1660
|
-
i, slideIndex, infiniteCount;
|
1671
|
+
if (_.options.infinite === true) {
|
1661
1672
|
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1673
|
+
if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
|
1674
|
+
_.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass('slick-active').attr('aria-hidden', 'false');
|
1675
|
+
} else {
|
1676
|
+
indexOffset = _.options.slidesToShow + index;
|
1677
|
+
allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active').attr('aria-hidden', 'false');
|
1678
|
+
}
|
1665
1679
|
|
1666
|
-
|
1680
|
+
if (index === 0) {
|
1681
|
+
allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center');
|
1682
|
+
} else if (index === _.slideCount - 1) {
|
1683
|
+
allSlides.eq(_.options.slidesToShow).addClass('slick-center');
|
1684
|
+
}
|
1667
1685
|
|
1668
|
-
|
1686
|
+
}
|
1669
1687
|
|
1670
|
-
|
1688
|
+
_.$slides.eq(index).addClass('slick-center');
|
1671
1689
|
|
1672
|
-
if (_.options.centerMode === true) {
|
1673
|
-
infiniteCount = _.options.slidesToShow + 1;
|
1674
1690
|
} else {
|
1675
|
-
|
1691
|
+
|
1692
|
+
if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
|
1693
|
+
_.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');
|
1694
|
+
} else if (allSlides.length <= _.options.slidesToShow) {
|
1695
|
+
allSlides.addClass('slick-active').attr('aria-hidden', 'false');
|
1696
|
+
} else {
|
1697
|
+
remainder = _.slideCount % _.options.slidesToShow;
|
1698
|
+
indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
|
1699
|
+
if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
|
1700
|
+
allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass('slick-active').attr('aria-hidden', 'false');
|
1701
|
+
} else {
|
1702
|
+
allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');
|
1703
|
+
}
|
1704
|
+
}
|
1705
|
+
|
1676
1706
|
}
|
1677
1707
|
|
1678
|
-
|
1679
|
-
|
1680
|
-
slideIndex = i - 1;
|
1681
|
-
$(_.$slides[slideIndex]).clone(true).attr('id', '')
|
1682
|
-
.attr('data-slick-index', slideIndex-_.slideCount)
|
1683
|
-
.prependTo(_.$slideTrack).addClass('slick-cloned');
|
1708
|
+
if (_.options.lazyLoad === 'ondemand') {
|
1709
|
+
_.lazyLoad();
|
1684
1710
|
}
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1711
|
+
|
1712
|
+
};
|
1713
|
+
|
1714
|
+
Slick.prototype.setupInfinite = function() {
|
1715
|
+
|
1716
|
+
var _ = this,
|
1717
|
+
i, slideIndex, infiniteCount;
|
1718
|
+
|
1719
|
+
if (_.options.fade === true) {
|
1720
|
+
_.options.centerMode = false;
|
1690
1721
|
}
|
1691
|
-
_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
|
1692
|
-
$(this).attr('id', '');
|
1693
|
-
});
|
1694
1722
|
|
1695
|
-
|
1723
|
+
if (_.options.infinite === true && _.options.fade === false) {
|
1724
|
+
|
1725
|
+
slideIndex = null;
|
1726
|
+
|
1727
|
+
if (_.slideCount > _.options.slidesToShow) {
|
1728
|
+
|
1729
|
+
if (_.options.centerMode === true) {
|
1730
|
+
infiniteCount = _.options.slidesToShow + 1;
|
1731
|
+
} else {
|
1732
|
+
infiniteCount = _.options.slidesToShow;
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
for (i = _.slideCount; i > (_.slideCount -
|
1736
|
+
infiniteCount); i -= 1) {
|
1737
|
+
slideIndex = i - 1;
|
1738
|
+
$(_.$slides[slideIndex]).clone(true).attr('id', '')
|
1739
|
+
.attr('data-slick-index', slideIndex - _.slideCount)
|
1740
|
+
.prependTo(_.$slideTrack).addClass('slick-cloned');
|
1741
|
+
}
|
1742
|
+
for (i = 0; i < infiniteCount; i += 1) {
|
1743
|
+
slideIndex = i;
|
1744
|
+
$(_.$slides[slideIndex]).clone(true).attr('id', '')
|
1745
|
+
.attr('data-slick-index', slideIndex + _.slideCount)
|
1746
|
+
.appendTo(_.$slideTrack).addClass('slick-cloned');
|
1747
|
+
}
|
1748
|
+
_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
|
1749
|
+
$(this).attr('id', '');
|
1750
|
+
});
|
1696
1751
|
|
1697
|
-
|
1752
|
+
}
|
1698
1753
|
|
1699
|
-
|
1754
|
+
}
|
1700
1755
|
|
1701
|
-
|
1756
|
+
};
|
1702
1757
|
|
1703
|
-
|
1704
|
-
var index = parseInt($(event.target).parents('.slick-slide').attr("data-slick-index"));
|
1705
|
-
if(!index) index = 0;
|
1758
|
+
Slick.prototype.setPaused = function(paused) {
|
1706
1759
|
|
1707
|
-
|
1708
|
-
_.$slider.find('.slick-slide').removeClass('slick-active').attr("aria-hidden","true");
|
1709
|
-
_.$slides.eq(index).addClass('slick-active').attr("aria-hidden","false");
|
1710
|
-
if(_.options.centerMode === true) {
|
1711
|
-
_.$slider.find('.slick-slide').removeClass('slick-center');
|
1712
|
-
_.$slides.eq(index).addClass('slick-center');
|
1713
|
-
}
|
1714
|
-
_.asNavFor(index);
|
1715
|
-
return;
|
1716
|
-
}
|
1717
|
-
_.slideHandler(index);
|
1760
|
+
var _ = this;
|
1718
1761
|
|
1719
|
-
|
1762
|
+
if (_.options.autoplay === true && _.options.pauseOnHover === true) {
|
1763
|
+
_.paused = paused;
|
1764
|
+
_.autoPlayClear();
|
1765
|
+
}
|
1766
|
+
};
|
1720
1767
|
|
1721
|
-
|
1768
|
+
Slick.prototype.selectHandler = function(event) {
|
1722
1769
|
|
1723
|
-
|
1724
|
-
_ = this;
|
1770
|
+
var _ = this;
|
1725
1771
|
|
1726
|
-
|
1772
|
+
var targetElement = $(event.target).is('.slick-slide') ?
|
1773
|
+
$(event.target) :
|
1774
|
+
$(event.target).parents('.slick-slide');
|
1727
1775
|
|
1728
|
-
|
1729
|
-
return;
|
1730
|
-
}
|
1776
|
+
var index = parseInt(targetElement.attr('data-slick-index'));
|
1731
1777
|
|
1732
|
-
|
1733
|
-
return;
|
1734
|
-
}
|
1778
|
+
if (!index) index = 0;
|
1735
1779
|
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1780
|
+
if (_.slideCount <= _.options.slidesToShow) {
|
1781
|
+
_.$slider.find('.slick-slide').removeClass('slick-active').attr('aria-hidden', 'true');
|
1782
|
+
_.$slides.eq(index).addClass('slick-active').attr("aria-hidden", "false");
|
1783
|
+
if (_.options.centerMode === true) {
|
1784
|
+
_.$slider.find('.slick-slide').removeClass('slick-center');
|
1785
|
+
_.$slides.eq(index).addClass('slick-center');
|
1786
|
+
}
|
1787
|
+
_.asNavFor(index);
|
1788
|
+
return;
|
1789
|
+
}
|
1790
|
+
_.slideHandler(index);
|
1739
1791
|
|
1740
|
-
|
1741
|
-
_.asNavFor(index);
|
1742
|
-
}
|
1792
|
+
};
|
1743
1793
|
|
1744
|
-
|
1745
|
-
targetLeft = _.getLeft(targetSlide);
|
1746
|
-
slideLeft = _.getLeft(_.currentSlide);
|
1794
|
+
Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
|
1747
1795
|
|
1748
|
-
|
1796
|
+
var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
|
1797
|
+
_ = this;
|
1749
1798
|
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
_.animateSlide(slideLeft, function() {
|
1755
|
-
_.postSlide(targetSlide);
|
1756
|
-
});
|
1757
|
-
} else {
|
1758
|
-
_.postSlide(targetSlide);
|
1759
|
-
}
|
1760
|
-
}
|
1761
|
-
return;
|
1762
|
-
} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
|
1763
|
-
if(_.options.fade === false) {
|
1764
|
-
targetSlide = _.currentSlide;
|
1765
|
-
if(dontAnimate!==true) {
|
1766
|
-
_.animateSlide(slideLeft, function() {
|
1767
|
-
_.postSlide(targetSlide);
|
1768
|
-
});
|
1769
|
-
} else {
|
1770
|
-
_.postSlide(targetSlide);
|
1799
|
+
sync = sync || false;
|
1800
|
+
|
1801
|
+
if (_.animating === true && _.options.waitForAnimate === true) {
|
1802
|
+
return;
|
1771
1803
|
}
|
1772
|
-
}
|
1773
|
-
return;
|
1774
|
-
}
|
1775
1804
|
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1805
|
+
if (_.options.fade === true && _.currentSlide === index) {
|
1806
|
+
return;
|
1807
|
+
}
|
1779
1808
|
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
} else {
|
1784
|
-
animSlide = _.slideCount + targetSlide;
|
1785
|
-
}
|
1786
|
-
} else if (targetSlide >= _.slideCount) {
|
1787
|
-
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
1788
|
-
animSlide = 0;
|
1789
|
-
} else {
|
1790
|
-
animSlide = targetSlide - _.slideCount;
|
1791
|
-
}
|
1792
|
-
} else {
|
1793
|
-
animSlide = targetSlide;
|
1794
|
-
}
|
1809
|
+
if (_.slideCount <= _.options.slidesToShow) {
|
1810
|
+
return;
|
1811
|
+
}
|
1795
1812
|
|
1796
|
-
|
1813
|
+
if (sync === false) {
|
1814
|
+
_.asNavFor(index);
|
1815
|
+
}
|
1797
1816
|
|
1798
|
-
|
1817
|
+
targetSlide = index;
|
1818
|
+
targetLeft = _.getLeft(targetSlide);
|
1819
|
+
slideLeft = _.getLeft(_.currentSlide);
|
1820
|
+
|
1821
|
+
_.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
|
1822
|
+
|
1823
|
+
if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
|
1824
|
+
if (_.options.fade === false) {
|
1825
|
+
targetSlide = _.currentSlide;
|
1826
|
+
if (dontAnimate !== true) {
|
1827
|
+
_.animateSlide(slideLeft, function() {
|
1828
|
+
_.postSlide(targetSlide);
|
1829
|
+
});
|
1830
|
+
} else {
|
1831
|
+
_.postSlide(targetSlide);
|
1832
|
+
}
|
1833
|
+
}
|
1834
|
+
return;
|
1835
|
+
} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
|
1836
|
+
if (_.options.fade === false) {
|
1837
|
+
targetSlide = _.currentSlide;
|
1838
|
+
if (dontAnimate !== true) {
|
1839
|
+
_.animateSlide(slideLeft, function() {
|
1840
|
+
_.postSlide(targetSlide);
|
1841
|
+
});
|
1842
|
+
} else {
|
1843
|
+
_.postSlide(targetSlide);
|
1844
|
+
}
|
1845
|
+
}
|
1846
|
+
return;
|
1847
|
+
}
|
1799
1848
|
|
1800
|
-
|
1801
|
-
|
1849
|
+
if (_.options.autoplay === true) {
|
1850
|
+
clearInterval(_.autoPlayTimer);
|
1851
|
+
}
|
1802
1852
|
|
1803
|
-
|
1853
|
+
if (targetSlide < 0) {
|
1854
|
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
1855
|
+
animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
|
1856
|
+
} else {
|
1857
|
+
animSlide = _.slideCount + targetSlide;
|
1858
|
+
}
|
1859
|
+
} else if (targetSlide >= _.slideCount) {
|
1860
|
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
1861
|
+
animSlide = 0;
|
1862
|
+
} else {
|
1863
|
+
animSlide = targetSlide - _.slideCount;
|
1864
|
+
}
|
1865
|
+
} else {
|
1866
|
+
animSlide = targetSlide;
|
1867
|
+
}
|
1804
1868
|
|
1805
|
-
|
1806
|
-
_.updateArrows();
|
1869
|
+
_.animating = true;
|
1807
1870
|
|
1808
|
-
|
1809
|
-
if(dontAnimate!==true) {
|
1810
|
-
_.fadeSlide(animSlide, function() {
|
1811
|
-
_.postSlide(animSlide);
|
1812
|
-
});
|
1813
|
-
} else {
|
1814
|
-
_.postSlide(animSlide);
|
1815
|
-
}
|
1816
|
-
_.animateHeight();
|
1817
|
-
return;
|
1818
|
-
}
|
1871
|
+
_.$slider.trigger("beforeChange", [_, _.currentSlide, animSlide]);
|
1819
1872
|
|
1820
|
-
|
1821
|
-
|
1822
|
-
_.postSlide(animSlide);
|
1823
|
-
});
|
1824
|
-
} else {
|
1825
|
-
_.postSlide(animSlide);
|
1826
|
-
}
|
1873
|
+
oldSlide = _.currentSlide;
|
1874
|
+
_.currentSlide = animSlide;
|
1827
1875
|
|
1828
|
-
|
1876
|
+
_.setSlideClasses(_.currentSlide);
|
1829
1877
|
|
1830
|
-
|
1878
|
+
_.updateDots();
|
1879
|
+
_.updateArrows();
|
1831
1880
|
|
1832
|
-
|
1881
|
+
if (_.options.fade === true) {
|
1882
|
+
if (dontAnimate !== true) {
|
1883
|
+
_.fadeSlide(animSlide, function() {
|
1884
|
+
_.postSlide(animSlide);
|
1885
|
+
});
|
1886
|
+
} else {
|
1887
|
+
_.postSlide(animSlide);
|
1888
|
+
}
|
1889
|
+
_.animateHeight();
|
1890
|
+
return;
|
1891
|
+
}
|
1833
1892
|
|
1834
|
-
|
1893
|
+
if (dontAnimate !== true) {
|
1894
|
+
_.animateSlide(targetLeft, function() {
|
1895
|
+
_.postSlide(animSlide);
|
1896
|
+
});
|
1897
|
+
} else {
|
1898
|
+
_.postSlide(animSlide);
|
1899
|
+
}
|
1835
1900
|
|
1836
|
-
|
1837
|
-
_.$nextArrow.hide();
|
1901
|
+
};
|
1838
1902
|
|
1839
|
-
|
1903
|
+
Slick.prototype.startLoad = function() {
|
1840
1904
|
|
1841
|
-
|
1905
|
+
var _ = this;
|
1842
1906
|
|
1843
|
-
|
1907
|
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
1844
1908
|
|
1845
|
-
|
1909
|
+
_.$prevArrow.hide();
|
1910
|
+
_.$nextArrow.hide();
|
1846
1911
|
|
1847
|
-
|
1912
|
+
}
|
1848
1913
|
|
1849
|
-
|
1914
|
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
1850
1915
|
|
1851
|
-
|
1916
|
+
_.$dots.hide();
|
1852
1917
|
|
1853
|
-
|
1918
|
+
}
|
1854
1919
|
|
1855
|
-
|
1856
|
-
yDist = _.touchObject.startY - _.touchObject.curY;
|
1857
|
-
r = Math.atan2(yDist, xDist);
|
1920
|
+
_.$slider.addClass('slick-loading');
|
1858
1921
|
|
1859
|
-
|
1860
|
-
if (swipeAngle < 0) {
|
1861
|
-
swipeAngle = 360 - Math.abs(swipeAngle);
|
1862
|
-
}
|
1922
|
+
};
|
1863
1923
|
|
1864
|
-
|
1865
|
-
return (_.options.rtl === false ? 'left' : 'right');
|
1866
|
-
}
|
1867
|
-
if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
|
1868
|
-
return (_.options.rtl === false ? 'left' : 'right');
|
1869
|
-
}
|
1870
|
-
if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
|
1871
|
-
return (_.options.rtl === false ? 'right' : 'left');
|
1872
|
-
}
|
1924
|
+
Slick.prototype.swipeDirection = function() {
|
1873
1925
|
|
1874
|
-
|
1926
|
+
var xDist, yDist, r, swipeAngle, _ = this;
|
1875
1927
|
|
1876
|
-
|
1928
|
+
xDist = _.touchObject.startX - _.touchObject.curX;
|
1929
|
+
yDist = _.touchObject.startY - _.touchObject.curY;
|
1930
|
+
r = Math.atan2(yDist, xDist);
|
1877
1931
|
|
1878
|
-
|
1932
|
+
swipeAngle = Math.round(r * 180 / Math.PI);
|
1933
|
+
if (swipeAngle < 0) {
|
1934
|
+
swipeAngle = 360 - Math.abs(swipeAngle);
|
1935
|
+
}
|
1879
1936
|
|
1880
|
-
|
1937
|
+
if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
|
1938
|
+
return (_.options.rtl === false ? 'left' : 'right');
|
1939
|
+
}
|
1940
|
+
if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
|
1941
|
+
return (_.options.rtl === false ? 'left' : 'right');
|
1942
|
+
}
|
1943
|
+
if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
|
1944
|
+
return (_.options.rtl === false ? 'right' : 'left');
|
1945
|
+
}
|
1946
|
+
if (_.options.verticalScrolling === true) {
|
1947
|
+
if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
|
1948
|
+
return 'left';
|
1949
|
+
} else {
|
1950
|
+
return 'right';
|
1951
|
+
}
|
1952
|
+
}
|
1881
1953
|
|
1882
|
-
|
1954
|
+
return 'vertical';
|
1883
1955
|
|
1884
|
-
|
1956
|
+
};
|
1885
1957
|
|
1886
|
-
|
1887
|
-
return false;
|
1888
|
-
}
|
1958
|
+
Slick.prototype.swipeEnd = function(event) {
|
1889
1959
|
|
1890
|
-
|
1891
|
-
|
1892
|
-
}
|
1960
|
+
var _ = this,
|
1961
|
+
slideCount;
|
1893
1962
|
|
1894
|
-
|
1895
|
-
|
1896
|
-
switch (_.swipeDirection()) {
|
1897
|
-
case 'left':
|
1898
|
-
slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();
|
1899
|
-
_.slideHandler(slideCount);
|
1900
|
-
_.currentDirection = 0;
|
1901
|
-
_.touchObject = {};
|
1902
|
-
_.$slider.trigger("swipe", [ _, "left"]);
|
1903
|
-
break;
|
1904
|
-
|
1905
|
-
case 'right':
|
1906
|
-
slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();
|
1907
|
-
_.slideHandler(slideCount);
|
1908
|
-
_.currentDirection = 1;
|
1909
|
-
_.touchObject = {};
|
1910
|
-
_.$slider.trigger("swipe", [ _, "right"]);
|
1911
|
-
break;
|
1912
|
-
}
|
1913
|
-
} else {
|
1914
|
-
if(_.touchObject.startX !== _.touchObject.curX) {
|
1915
|
-
_.slideHandler(_.currentSlide);
|
1916
|
-
_.touchObject = {};
|
1917
|
-
}
|
1918
|
-
}
|
1963
|
+
_.dragging = false;
|
1919
1964
|
|
1920
|
-
|
1965
|
+
_.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;
|
1921
1966
|
|
1922
|
-
|
1967
|
+
if (_.touchObject.curX === undefined) {
|
1968
|
+
return false;
|
1969
|
+
}
|
1923
1970
|
|
1924
|
-
|
1971
|
+
if (_.touchObject.edgeHit === true) {
|
1972
|
+
_.$slider.trigger("edge", [_, _.swipeDirection()]);
|
1973
|
+
}
|
1925
1974
|
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1975
|
+
if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
|
1976
|
+
|
1977
|
+
switch (_.swipeDirection()) {
|
1978
|
+
case 'left':
|
1979
|
+
slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();
|
1980
|
+
_.slideHandler(slideCount);
|
1981
|
+
_.currentDirection = 0;
|
1982
|
+
_.touchObject = {};
|
1983
|
+
_.$slider.trigger("swipe", [_, "left"]);
|
1984
|
+
break;
|
1985
|
+
|
1986
|
+
case 'right':
|
1987
|
+
slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();
|
1988
|
+
_.slideHandler(slideCount);
|
1989
|
+
_.currentDirection = 1;
|
1990
|
+
_.touchObject = {};
|
1991
|
+
_.$slider.trigger("swipe", [_, "right"]);
|
1992
|
+
break;
|
1993
|
+
}
|
1994
|
+
} else {
|
1995
|
+
if (_.touchObject.startX !== _.touchObject.curX) {
|
1996
|
+
_.slideHandler(_.currentSlide);
|
1997
|
+
_.touchObject = {};
|
1998
|
+
}
|
1999
|
+
}
|
1931
2000
|
|
1932
|
-
|
1933
|
-
event.originalEvent.touches.length : 1;
|
2001
|
+
};
|
1934
2002
|
|
1935
|
-
|
1936
|
-
.touchThreshold;
|
2003
|
+
Slick.prototype.swipeHandler = function(event) {
|
1937
2004
|
|
1938
|
-
|
2005
|
+
var _ = this;
|
1939
2006
|
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
2007
|
+
if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
|
2008
|
+
return;
|
2009
|
+
} else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
|
2010
|
+
return;
|
2011
|
+
}
|
1943
2012
|
|
1944
|
-
|
1945
|
-
|
1946
|
-
break;
|
2013
|
+
_.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
|
2014
|
+
event.originalEvent.touches.length : 1;
|
1947
2015
|
|
1948
|
-
|
1949
|
-
|
1950
|
-
break;
|
2016
|
+
_.touchObject.minSwipe = _.listWidth / _.options
|
2017
|
+
.touchThreshold;
|
1951
2018
|
|
1952
|
-
|
2019
|
+
if (_.options.verticalScrolling === true) {
|
2020
|
+
_.touchObject.minSwipe = _.listHeight / _.options
|
2021
|
+
.touchThreshold;
|
2022
|
+
}
|
1953
2023
|
|
1954
|
-
|
2024
|
+
switch (event.data.action) {
|
1955
2025
|
|
1956
|
-
|
2026
|
+
case 'start':
|
2027
|
+
_.swipeStart(event);
|
2028
|
+
break;
|
1957
2029
|
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
2030
|
+
case 'move':
|
2031
|
+
_.swipeMove(event);
|
2032
|
+
break;
|
1961
2033
|
|
1962
|
-
|
2034
|
+
case 'end':
|
2035
|
+
_.swipeEnd(event);
|
2036
|
+
break;
|
1963
2037
|
|
1964
|
-
|
1965
|
-
return false;
|
1966
|
-
}
|
2038
|
+
}
|
1967
2039
|
|
1968
|
-
|
2040
|
+
};
|
1969
2041
|
|
1970
|
-
|
1971
|
-
_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
|
2042
|
+
Slick.prototype.swipeMove = function(event) {
|
1972
2043
|
|
1973
|
-
|
1974
|
-
|
2044
|
+
var _ = this,
|
2045
|
+
edgeWasHit = false,
|
2046
|
+
curLeft, swipeDirection, swipeLength, positionOffset, touches;
|
1975
2047
|
|
1976
|
-
|
2048
|
+
touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
|
1977
2049
|
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
2050
|
+
if (!_.dragging || touches && touches.length !== 1) {
|
2051
|
+
return false;
|
2052
|
+
}
|
1981
2053
|
|
1982
|
-
|
1983
|
-
event.preventDefault();
|
1984
|
-
}
|
2054
|
+
curLeft = _.getLeft(_.currentSlide);
|
1985
2055
|
|
1986
|
-
|
2056
|
+
_.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
|
2057
|
+
_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
|
1987
2058
|
|
1988
|
-
|
2059
|
+
_.touchObject.swipeLength = Math.round(Math.sqrt(
|
2060
|
+
Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
|
1989
2061
|
|
1990
|
-
|
2062
|
+
if (_.options.verticalScrolling === true) {
|
2063
|
+
_.touchObject.swipeLength = Math.round(Math.sqrt(
|
2064
|
+
Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
|
2065
|
+
}
|
1991
2066
|
|
1992
|
-
|
1993
|
-
if ((_.currentSlide === 0 && swipeDirection === "right") || (_.currentSlide >= _.getDotCount() && swipeDirection === "left")) {
|
1994
|
-
swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
|
1995
|
-
_.touchObject.edgeHit = true;
|
1996
|
-
}
|
1997
|
-
}
|
2067
|
+
swipeDirection = _.swipeDirection();
|
1998
2068
|
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
|
2003
|
-
}
|
2069
|
+
if (swipeDirection === 'vertical') {
|
2070
|
+
return;
|
2071
|
+
}
|
2004
2072
|
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2073
|
+
if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
|
2074
|
+
event.preventDefault();
|
2075
|
+
}
|
2008
2076
|
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2077
|
+
positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
|
2078
|
+
if (_.options.verticalScrolling === true) {
|
2079
|
+
positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
|
2080
|
+
}
|
2013
2081
|
|
2014
|
-
_.setCSS(_.swipeLeft);
|
2015
2082
|
|
2016
|
-
|
2083
|
+
swipeLength = _.touchObject.swipeLength;
|
2017
2084
|
|
2018
|
-
|
2085
|
+
_.touchObject.edgeHit = false;
|
2019
2086
|
|
2020
|
-
|
2021
|
-
|
2087
|
+
if (_.options.infinite === false) {
|
2088
|
+
if ((_.currentSlide === 0 && swipeDirection === "right") || (_.currentSlide >= _.getDotCount() && swipeDirection === "left")) {
|
2089
|
+
swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
|
2090
|
+
_.touchObject.edgeHit = true;
|
2091
|
+
}
|
2092
|
+
}
|
2022
2093
|
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2094
|
+
if (_.options.vertical === false) {
|
2095
|
+
_.swipeLeft = curLeft + swipeLength * positionOffset;
|
2096
|
+
} else {
|
2097
|
+
_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
|
2098
|
+
}
|
2099
|
+
if (_.options.verticalScrolling === true) {
|
2100
|
+
_.swipeLeft = curLeft + swipeLength * positionOffset;
|
2101
|
+
}
|
2027
2102
|
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2103
|
+
if (_.options.fade === true || _.options.touchMove === false) {
|
2104
|
+
return false;
|
2105
|
+
}
|
2031
2106
|
|
2032
|
-
|
2033
|
-
|
2107
|
+
if (_.animating === true) {
|
2108
|
+
_.swipeLeft = null;
|
2109
|
+
return false;
|
2110
|
+
}
|
2034
2111
|
|
2035
|
-
|
2112
|
+
_.setCSS(_.swipeLeft);
|
2036
2113
|
|
2037
|
-
|
2114
|
+
};
|
2038
2115
|
|
2039
|
-
|
2116
|
+
Slick.prototype.swipeStart = function(event) {
|
2040
2117
|
|
2041
|
-
|
2118
|
+
var _ = this,
|
2119
|
+
touches;
|
2042
2120
|
|
2043
|
-
|
2121
|
+
if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
|
2122
|
+
_.touchObject = {};
|
2123
|
+
return false;
|
2124
|
+
}
|
2044
2125
|
|
2045
|
-
|
2126
|
+
if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
|
2127
|
+
touches = event.originalEvent.touches[0];
|
2128
|
+
}
|
2046
2129
|
|
2047
|
-
|
2130
|
+
_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
|
2131
|
+
_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
|
2048
2132
|
|
2049
|
-
|
2133
|
+
_.dragging = true;
|
2050
2134
|
|
2051
|
-
|
2135
|
+
};
|
2052
2136
|
|
2053
|
-
|
2137
|
+
Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
|
2054
2138
|
|
2055
|
-
|
2139
|
+
var _ = this;
|
2056
2140
|
|
2057
|
-
|
2141
|
+
if (_.$slidesCache !== null) {
|
2058
2142
|
|
2059
|
-
|
2143
|
+
_.unload();
|
2060
2144
|
|
2061
|
-
|
2062
|
-
if (_.$dots) {
|
2063
|
-
_.$dots.remove();
|
2064
|
-
}
|
2065
|
-
if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
|
2066
|
-
_.$prevArrow.remove();
|
2067
|
-
}
|
2068
|
-
if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
|
2069
|
-
_.$nextArrow.remove();
|
2070
|
-
}
|
2071
|
-
_.$slides.removeClass('slick-slide slick-active slick-visible').attr("aria-hidden","true").css('width', '');
|
2145
|
+
_.$slideTrack.children(this.options.slide).detach();
|
2072
2146
|
|
2073
|
-
|
2147
|
+
_.$slidesCache.appendTo(_.$slideTrack);
|
2074
2148
|
|
2075
|
-
|
2149
|
+
_.reinit();
|
2076
2150
|
|
2077
|
-
|
2078
|
-
_.destroy();
|
2151
|
+
}
|
2079
2152
|
|
2080
|
-
|
2153
|
+
};
|
2081
2154
|
|
2082
|
-
|
2155
|
+
Slick.prototype.unload = function() {
|
2083
2156
|
|
2084
|
-
|
2157
|
+
var _ = this;
|
2085
2158
|
|
2086
|
-
|
2159
|
+
$('.slick-cloned', _.$slider).remove();
|
2160
|
+
if (_.$dots) {
|
2161
|
+
_.$dots.remove();
|
2162
|
+
}
|
2163
|
+
if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
|
2164
|
+
_.$prevArrow.remove();
|
2165
|
+
}
|
2166
|
+
if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
|
2167
|
+
_.$nextArrow.remove();
|
2168
|
+
}
|
2169
|
+
_.$slides.removeClass('slick-slide slick-active slick-visible').attr("aria-hidden", "true").css('width', '');
|
2087
2170
|
|
2088
|
-
|
2089
|
-
true && _.slideCount > _.options.slidesToShow) {
|
2090
|
-
_.$prevArrow.removeClass('slick-disabled');
|
2091
|
-
_.$nextArrow.removeClass('slick-disabled');
|
2092
|
-
if (_.currentSlide === 0) {
|
2093
|
-
_.$prevArrow.addClass('slick-disabled');
|
2094
|
-
_.$nextArrow.removeClass('slick-disabled');
|
2095
|
-
} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
|
2096
|
-
_.$nextArrow.addClass('slick-disabled');
|
2097
|
-
_.$prevArrow.removeClass('slick-disabled');
|
2098
|
-
} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
|
2099
|
-
_.$nextArrow.addClass('slick-disabled');
|
2100
|
-
_.$prevArrow.removeClass('slick-disabled');
|
2101
|
-
}
|
2102
|
-
}
|
2171
|
+
};
|
2103
2172
|
|
2104
|
-
|
2173
|
+
Slick.prototype.unslick = function() {
|
2105
2174
|
|
2106
|
-
|
2175
|
+
var _ = this;
|
2176
|
+
_.destroy();
|
2107
2177
|
|
2108
|
-
|
2178
|
+
};
|
2109
2179
|
|
2110
|
-
|
2180
|
+
Slick.prototype.updateArrows = function() {
|
2111
2181
|
|
2112
|
-
|
2113
|
-
|
2182
|
+
var _ = this,
|
2183
|
+
centerOffset;
|
2114
2184
|
|
2115
|
-
|
2185
|
+
centerOffset = Math.floor(_.options.slidesToShow / 2);
|
2116
2186
|
|
2117
|
-
|
2187
|
+
if (_.options.arrows === true && _.options.infinite !==
|
2188
|
+
true && _.slideCount > _.options.slidesToShow) {
|
2189
|
+
_.$prevArrow.removeClass('slick-disabled');
|
2190
|
+
_.$nextArrow.removeClass('slick-disabled');
|
2191
|
+
if (_.currentSlide === 0) {
|
2192
|
+
_.$prevArrow.addClass('slick-disabled');
|
2193
|
+
_.$nextArrow.removeClass('slick-disabled');
|
2194
|
+
} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
|
2195
|
+
_.$nextArrow.addClass('slick-disabled');
|
2196
|
+
_.$prevArrow.removeClass('slick-disabled');
|
2197
|
+
} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
|
2198
|
+
_.$nextArrow.addClass('slick-disabled');
|
2199
|
+
_.$prevArrow.removeClass('slick-disabled');
|
2200
|
+
}
|
2201
|
+
}
|
2118
2202
|
|
2119
|
-
|
2203
|
+
};
|
2120
2204
|
|
2121
|
-
|
2205
|
+
Slick.prototype.updateDots = function() {
|
2122
2206
|
|
2123
|
-
|
2124
|
-
_.paused = true;
|
2125
|
-
_.autoPlayClear();
|
2126
|
-
} else {
|
2127
|
-
_.paused = false;
|
2128
|
-
_.autoPlay();
|
2129
|
-
}
|
2207
|
+
var _ = this;
|
2130
2208
|
|
2131
|
-
|
2209
|
+
if (_.$dots !== null) {
|
2132
2210
|
|
2133
|
-
|
2134
|
-
|
2135
|
-
for(i; i < l; i++) {
|
2136
|
-
if (typeof opt == 'object' || typeof opt == 'undefined')
|
2137
|
-
_[i].slick = new Slick(_[i], opt);
|
2138
|
-
else
|
2139
|
-
ret = _[i].slick[opt].apply(_[i].slick, args);
|
2140
|
-
if (typeof ret != 'undefined') return ret;
|
2141
|
-
}
|
2142
|
-
return _;
|
2143
|
-
};
|
2211
|
+
_.$dots.find('li').removeClass('slick-active').attr("aria-hidden", "true");
|
2212
|
+
_.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active').attr("aria-hidden", "false");
|
2144
2213
|
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2214
|
+
}
|
2215
|
+
|
2216
|
+
};
|
2217
|
+
|
2218
|
+
Slick.prototype.visibility = function() {
|
2219
|
+
|
2220
|
+
var _ = this;
|
2221
|
+
|
2222
|
+
if (document[_.hidden]) {
|
2223
|
+
_.paused = true;
|
2224
|
+
_.autoPlayClear();
|
2225
|
+
} else {
|
2226
|
+
_.paused = false;
|
2227
|
+
_.autoPlay();
|
2228
|
+
}
|
2229
|
+
|
2230
|
+
};
|
2231
|
+
|
2232
|
+
$.fn.slick = function() {
|
2233
|
+
var _ = this,
|
2234
|
+
opt = arguments[0],
|
2235
|
+
args = Array.prototype.slice.call(arguments, 1),
|
2236
|
+
l = _.length,
|
2237
|
+
i = 0,
|
2238
|
+
ret;
|
2239
|
+
for (i; i < l; i++) {
|
2240
|
+
if (typeof opt == 'object' || typeof opt == 'undefined')
|
2241
|
+
_[i].slick = new Slick(_[i], opt);
|
2242
|
+
else
|
2243
|
+
ret = _[i].slick[opt].apply(_[i].slick, args);
|
2244
|
+
if (typeof ret != 'undefined') return ret;
|
2245
|
+
}
|
2246
|
+
return _;
|
2247
|
+
};
|
2148
2248
|
|
2149
2249
|
}));
|