j1-template 2024.3.16 → 2024.3.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/data/amplitude.html +132 -61
- data/assets/data/banner.html +1 -1
- data/assets/data/cookieconsent.html +1 -1
- data/assets/data/docsearch.html +1 -1
- data/assets/data/fab.html +1 -1
- data/assets/data/footer.html +1 -1
- data/assets/data/galeries.html +1 -1
- data/assets/data/gallery_customizer.html +1 -1
- data/assets/data/gemini-ui.html +1 -1
- data/assets/data/iframes.html +1 -1
- data/assets/data/masonry.html +1 -1
- data/assets/data/masterslider.html +1 -1
- data/assets/data/menu.html +1 -1
- data/assets/data/mmenu.html +1 -1
- data/assets/data/mmenu_sidebar.html +1 -1
- data/assets/data/mmenu_toc.html +1 -1
- data/assets/data/panel.html +1 -1
- data/assets/data/quicklinks.html +1 -1
- data/assets/data/rtext_resizer.html +1 -1
- data/assets/data/slick.html +1 -1
- data/assets/data/speak2me.html +1 -1
- data/assets/data/swiper.html +313 -0
- data/assets/theme/j1/adapter/js/amplitude.30.js +1177 -0
- data/assets/theme/j1/adapter/js/amplitude.js +152 -121
- data/assets/theme/j1/adapter/js/j1.js +3 -3
- data/assets/theme/j1/adapter/js/masterslider.js +2 -1
- data/assets/theme/j1/adapter/js/swiper.js +231 -0
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +13 -3
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +53 -6
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +2 -1
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.15.js +1594 -0
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +1617 -89
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/bar.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/circular-equalizer.js +31 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/frequency-analyzer.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/michael-bromley.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/template.js +1 -1
- data/assets/theme/j1/modules/photoswipe/.version_5.4.4 +6 -0
- data/assets/theme/j1/modules/photoswipe/LICENSE +21 -0
- data/assets/theme/j1/modules/photoswipe/README.md +32 -0
- data/assets/theme/j1/modules/photoswipe/css/org/photoswipe-dynamic-caption-plugin.umd.min.js +5 -0
- data/assets/theme/j1/modules/photoswipe/css/org/photoswipe.css +420 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.css +67 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.min.css +16 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe.css +376 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe.min.css +17 -0
- data/assets/theme/j1/modules/photoswipe/css/scss/photoswipe.scss +427 -0
- data/assets/theme/j1/modules/photoswipe/example/photoswipe-caption-plugin.html +237 -0
- data/assets/theme/j1/modules/photoswipe/example/test-gallery.html +36 -0
- data/assets/theme/j1/modules/photoswipe/js/README.md +43 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-caption-plugin.min.js +5 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-core.min.js +18 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-lightbox.min.js +18 -0
- data/assets/theme/j1/modules/swiper/.version_1.2.0 +15 -0
- data/assets/theme/j1/modules/swiper/LICENSE +20 -0
- data/assets/theme/j1/modules/swiper/README.md +95 -0
- data/assets/theme/j1/modules/swiper/css/swiper-bundle.css +740 -0
- data/assets/theme/j1/modules/swiper/css/swiper-bundle.min..css +17 -0
- data/assets/theme/j1/modules/swiper/css/theme/uno.css +249 -0
- data/assets/theme/j1/modules/swiper/css/theme/uno.min.css +154 -0
- data/assets/theme/j1/modules/swiper/js/swiper-bundle.js +9785 -0
- data/assets/theme/j1/modules/swiper/js/swiper-bundle.min.js +17 -0
- data/assets/theme/j1/modules/swiper/swiperjs.com-demos.url +2 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/amplitude.yml +374 -39
- data/lib/starter_web/_data/modules/defaults/amplitude.yml +60 -35
- data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/swiper.yml +515 -0
- data/lib/starter_web/_data/modules/swiper.yml +227 -0
- data/lib/starter_web/_data/resources.yml +53 -1
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/asciidoctor/amplitude-block.rb +1 -0
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +0 -4
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/der_unverzichtbare_feind.jpg +0 -0
- data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/ein_diener_vieler_herren.jpg +0 -0
- data/lib/starter_web/assets/video/poster/youtube/the_piano/the-piano.jpg +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/_includes/attributes.asciidoc +45 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/200_photoswipe_parameters.asciidoc +510 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/210_photoswipe_lightbox_parameters.asciidoc +98 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/300_caption_plugin_for_photoSwipe.asciidoc +327 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_features.asciidoc +50 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_html_layout.asciidoc +122 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_initialization.asciidoc +53 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/110_swiper_common_options.asciidoc +43 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_a_k.asciidoc +994 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_l_o.asciidoc +473 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_p_s.asciidoc +700 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_t_z.asciidoc +413 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/300_swiper_instance_properties.asciidoc +873 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/400_swiper_modules.asciidoc +2514 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/500_swiper_methods.asciidoc +989 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/600_swiper_events.asciidoc +1534 -0
- data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +77 -63
- data/lib/starter_web/pages/public/photoswipe_api.adoc +150 -0
- data/lib/starter_web/pages/public/swiper_api.adoc +128 -0
- data/lib/starter_web/pages/public/swiper_tester.adoc +973 -0
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +12 -5
- data/lib/starter_web/pages/public/tour/play_audio.adoc +60 -5
- data/lib/starter_web/pages/public/tour/play_video.adoc +30 -0
- data/lib/starter_web/pages/public/tour/present_images.adoc +5 -5
- metadata +56 -3
- data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +0 -211
@@ -0,0 +1,989 @@
|
|
1
|
+
[role="mt-5"]
|
2
|
+
== Methods
|
3
|
+
|
4
|
+
Find method settings also with the
|
5
|
+
https://swiperjs.com/swiper-api[Swiper Documentation, {browser-window--new}].
|
6
|
+
|
7
|
+
[mt-5 mb-5]
|
8
|
+
[CAUTION]
|
9
|
+
====
|
10
|
+
*Change* the Swiper *instance* variable *swiper* used in column *Synopsis*
|
11
|
+
to your setup.
|
12
|
+
====
|
13
|
+
|
14
|
+
|
15
|
+
[role="mt-4"]
|
16
|
+
=== attachEvents
|
17
|
+
|
18
|
+
*Re-Attach* all event listeners configured for an instance.
|
19
|
+
|
20
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
21
|
+
|===
|
22
|
+
|Synopsis |Description \| Parameters
|
23
|
+
|
24
|
+
|
|
25
|
+
[source, js]
|
26
|
+
----
|
27
|
+
swiper.attachEvents();
|
28
|
+
----
|
29
|
+
|Attach all event listeners *again*.
|
30
|
+
|
31
|
+
|===
|
32
|
+
|
33
|
+
[role="mt-4"]
|
34
|
+
=== changeDirection
|
35
|
+
|
36
|
+
Change the slider orientation from *horizontal* to *vertical* or back.
|
37
|
+
|
38
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
39
|
+
|===
|
40
|
+
|Synopsis |Description \| Parameters
|
41
|
+
|
42
|
+
|
|
43
|
+
[source, js]
|
44
|
+
----
|
45
|
+
swiper.changeDirection(
|
46
|
+
direction,
|
47
|
+
needUpdate
|
48
|
+
);
|
49
|
+
----
|
50
|
+
|
51
|
+
|Change the slider orientation from *horizontal* to *vertical* and back.
|
52
|
+
|
53
|
+
direction::
|
54
|
+
If *not* specified, the value will automatically *toggle* the direction
|
55
|
+
(to the *opposite*).
|
56
|
+
|
57
|
+
* _Type_: string of _horizontal_ or _vertical_.
|
58
|
+
* _Default_: *no defaults*
|
59
|
+
|
60
|
+
needUpdate::
|
61
|
+
If set to `true`, automatically `update()` method is called.
|
62
|
+
|
63
|
+
* _Type_ boolean
|
64
|
+
* _Default_: `true`
|
65
|
+
|
66
|
+
|===
|
67
|
+
|
68
|
+
[role="mt-4"]
|
69
|
+
[[method-changeLanguageDirection]]
|
70
|
+
=== changeLanguageDirection
|
71
|
+
|
72
|
+
Changes slider language direction.
|
73
|
+
|
74
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
75
|
+
|===
|
76
|
+
|Synopsis |Description \| Parameters
|
77
|
+
|
78
|
+
|
|
79
|
+
[source, js]
|
80
|
+
----
|
81
|
+
swiper.changeLanguageDirection(direction);
|
82
|
+
----
|
83
|
+
|
84
|
+
|Changes slider language direction.
|
85
|
+
|
86
|
+
direction::
|
87
|
+
Should be _rtl_ or _ltr_.
|
88
|
+
|
89
|
+
* _Type_: string of _rtl_ or _ltr_.
|
90
|
+
* _Default_: *no defaults*
|
91
|
+
|===
|
92
|
+
|
93
|
+
[role="mt-4"]
|
94
|
+
[[method-destroy]]
|
95
|
+
=== destroy
|
96
|
+
|
97
|
+
Destroy a slider *instance* and detach all *event listeners*.
|
98
|
+
|
99
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
100
|
+
|===
|
101
|
+
|Synopsis |Description \| Parameters
|
102
|
+
|
103
|
+
|
|
104
|
+
[source, js]
|
105
|
+
----
|
106
|
+
swiper.destroy(
|
107
|
+
deleteInstance,
|
108
|
+
cleanStyles
|
109
|
+
);
|
110
|
+
----
|
111
|
+
|
112
|
+
|Destroy a slider *instance* and detach all *event listeners*.
|
113
|
+
|
114
|
+
deleteInstance::
|
115
|
+
Set to `false` to *not delete* the swiper instance.
|
116
|
+
|
117
|
+
* _Type_: boolean
|
118
|
+
* _Default_: `true`
|
119
|
+
|
120
|
+
cleanStyles::
|
121
|
+
If set to `true`, all custom styles will be *removed* from slides, wrapper
|
122
|
+
and container. Useful if you need to destroy a swiper instance and to init
|
123
|
+
again with *new options* or in *different direction*.
|
124
|
+
|
125
|
+
* _Type_: boolean
|
126
|
+
* _Default_: `true`
|
127
|
+
|
128
|
+
|===
|
129
|
+
|
130
|
+
[role="mt-4"]
|
131
|
+
[[method-detachEvents]]
|
132
|
+
=== detachEvents
|
133
|
+
|
134
|
+
Detach all event listeners.
|
135
|
+
|
136
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
137
|
+
|===
|
138
|
+
|Synopsis |Description \| Parameters
|
139
|
+
|
140
|
+
|
|
141
|
+
[source, js]
|
142
|
+
----
|
143
|
+
swiper.detachEvents();
|
144
|
+
----
|
145
|
+
|
146
|
+
|Detach all event listeners.
|
147
|
+
|
148
|
+
|===
|
149
|
+
|
150
|
+
[role="mt-4"]
|
151
|
+
[[method-disable]]
|
152
|
+
=== disable
|
153
|
+
|
154
|
+
Disable Swiper (if it was *enabled*). When Swiper is disabled, it will
|
155
|
+
hide all navigation elements and won't respond to any events and
|
156
|
+
interactions.
|
157
|
+
|
158
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
159
|
+
|===
|
160
|
+
|Synopsis |Description \| Parameters
|
161
|
+
|
162
|
+
|
|
163
|
+
[source, js]
|
164
|
+
----
|
165
|
+
swiper.disable();
|
166
|
+
----
|
167
|
+
|
168
|
+
|Disable Swiper (if it was *enabled*). When Swiper is disabled, it will
|
169
|
+
hide all navigation elements and won't respond to any events and
|
170
|
+
interactions.
|
171
|
+
|
172
|
+
|===
|
173
|
+
|
174
|
+
[role="mt-4"]
|
175
|
+
[[method-emit]]
|
176
|
+
=== emit
|
177
|
+
|
178
|
+
Fire event on instance.
|
179
|
+
|
180
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
181
|
+
|===
|
182
|
+
|Synopsis |Description \| Parameters
|
183
|
+
|
184
|
+
|
|
185
|
+
[source, js]
|
186
|
+
----
|
187
|
+
swiper.emit(
|
188
|
+
event,
|
189
|
+
args
|
190
|
+
);
|
191
|
+
----
|
192
|
+
|
193
|
+
|Fire event on instance.
|
194
|
+
|
195
|
+
|===
|
196
|
+
|
197
|
+
[role="mt-4"]
|
198
|
+
[[method-enable]]
|
199
|
+
=== enable
|
200
|
+
|
201
|
+
Enable a swiper instance (if it was *disabled*).
|
202
|
+
|
203
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
204
|
+
|===
|
205
|
+
|Synopsis |Description \| Parameters
|
206
|
+
|
207
|
+
|
|
208
|
+
[source, js]
|
209
|
+
----
|
210
|
+
swiper.enable();
|
211
|
+
----
|
212
|
+
|
213
|
+
|Enable a swiper instance (if it was *disabled*).
|
214
|
+
|
215
|
+
|===
|
216
|
+
|
217
|
+
[role="mt-4"]
|
218
|
+
[[method-extendDefaults]]
|
219
|
+
=== extendDefaults
|
220
|
+
|
221
|
+
Extend a swiper instance by (global) swiper options (properties).
|
222
|
+
See section <<Common options>> for common, frequently used options.
|
223
|
+
|
224
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
225
|
+
|===
|
226
|
+
|Synopsis |Description \| Parameters
|
227
|
+
|
228
|
+
|
|
229
|
+
[source, js]
|
230
|
+
----
|
231
|
+
swiper.extendDefaults(options);
|
232
|
+
----
|
233
|
+
|
234
|
+
|Extend a swiper instance by (global) swiper options (properties).
|
235
|
+
See section <<Common options>> for common, frequently used options.
|
236
|
+
|
237
|
+
|===
|
238
|
+
|
239
|
+
[role="mt-4"]
|
240
|
+
[[method-getTranslate]]
|
241
|
+
=== getTranslate
|
242
|
+
|
243
|
+
Get current values of swiper wrapper CSS3 *transform translate* settings.
|
244
|
+
|
245
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
246
|
+
|===
|
247
|
+
|Synopsis |Description \| Parameters
|
248
|
+
|
249
|
+
|
|
250
|
+
[source, js]
|
251
|
+
----
|
252
|
+
swiper.getTranslate();
|
253
|
+
----
|
254
|
+
|
255
|
+
|Get current values of swiper wrapper CSS3 *transform translate* settings.
|
256
|
+
|
257
|
+
|===
|
258
|
+
|
259
|
+
[role="mt-4"]
|
260
|
+
[[method-init]]
|
261
|
+
=== init
|
262
|
+
|
263
|
+
Initialize a slider on its HTML element `el`.
|
264
|
+
|
265
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
266
|
+
|===
|
267
|
+
|Synopsis |Description \| Parameters
|
268
|
+
|
269
|
+
|
|
270
|
+
[source, js]
|
271
|
+
----
|
272
|
+
swiper.init(el);
|
273
|
+
----
|
274
|
+
|
275
|
+
|Initialize a slider on its HTML element `el`.
|
276
|
+
|
277
|
+
|===
|
278
|
+
|
279
|
+
[role="mt-4"]
|
280
|
+
[[method-maxTranslate]]
|
281
|
+
=== maxTranslate
|
282
|
+
|
283
|
+
Get current maximal CSS3 *transform translate* value.
|
284
|
+
|
285
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
286
|
+
|===
|
287
|
+
|Synopsis |Description \| Parameters
|
288
|
+
|
289
|
+
|
|
290
|
+
[source, js]
|
291
|
+
----
|
292
|
+
swiper.maxTranslate();
|
293
|
+
----
|
294
|
+
|
295
|
+
|Get current minimal CSS3 *transform translate* value.
|
296
|
+
|
297
|
+
|===
|
298
|
+
|
299
|
+
[role="mt-4"]
|
300
|
+
[[method-minTranslate]]
|
301
|
+
=== minTranslate
|
302
|
+
|
303
|
+
Get current maximal CSS3 *transform translate* value.
|
304
|
+
|
305
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
306
|
+
|===
|
307
|
+
|Synopsis |Description \| Parameters
|
308
|
+
|
309
|
+
|
|
310
|
+
[source, js]
|
311
|
+
----
|
312
|
+
swiper.minTranslate();
|
313
|
+
----
|
314
|
+
|
315
|
+
|Get current minimal CSS3 *transform translate* value.
|
316
|
+
|
317
|
+
|===
|
318
|
+
|
319
|
+
[role="mt-4"]
|
320
|
+
[[method-off]]
|
321
|
+
=== off
|
322
|
+
|
323
|
+
Remove a event handler.
|
324
|
+
|
325
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
326
|
+
|===
|
327
|
+
|Synopsis |Description \| Parameters
|
328
|
+
|
329
|
+
|
|
330
|
+
[source, js]
|
331
|
+
----
|
332
|
+
swiper.off(
|
333
|
+
event,
|
334
|
+
handler
|
335
|
+
);
|
336
|
+
----
|
337
|
+
|
338
|
+
|Remove a event handler.
|
339
|
+
|
340
|
+
|===
|
341
|
+
|
342
|
+
[role="mt-4"]
|
343
|
+
[[method-offAny]]
|
344
|
+
=== offAny
|
345
|
+
|
346
|
+
Remove a event listener that will be fired on *all events*.
|
347
|
+
|
348
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
349
|
+
|===
|
350
|
+
|Synopsis |Description \| Parameters
|
351
|
+
|
352
|
+
|
|
353
|
+
[source, js]
|
354
|
+
----
|
355
|
+
swiper.offAny(handler);
|
356
|
+
----
|
357
|
+
|
358
|
+
|Remove a event listener that will be fired on *all events*.
|
359
|
+
|
360
|
+
|===
|
361
|
+
|
362
|
+
[role="mt-4"]
|
363
|
+
[[method-on]]
|
364
|
+
=== on
|
365
|
+
|
366
|
+
Add a event handler.
|
367
|
+
|
368
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
369
|
+
|===
|
370
|
+
|Synopsis |Description \| Parameters
|
371
|
+
|
372
|
+
|
|
373
|
+
[source, js]
|
374
|
+
----
|
375
|
+
swiper.on(event, handler);
|
376
|
+
----
|
377
|
+
|
378
|
+
|Add a event handler.
|
379
|
+
|
380
|
+
|===
|
381
|
+
|
382
|
+
[role="mt-4"]
|
383
|
+
[[method-onAny]]
|
384
|
+
=== onAny
|
385
|
+
|
386
|
+
Add a event listener that will be fired on *all events*.
|
387
|
+
|
388
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
389
|
+
|===
|
390
|
+
|Synopsis |Description \| Parameters
|
391
|
+
|
392
|
+
|
|
393
|
+
[source, js]
|
394
|
+
----
|
395
|
+
swiper.onAny(handler);
|
396
|
+
----
|
397
|
+
|
398
|
+
|ReAddmove a event listener that will be fired on *all events*.
|
399
|
+
|
400
|
+
|===
|
401
|
+
|
402
|
+
[role="mt-4"]
|
403
|
+
[[method-once]]
|
404
|
+
=== once
|
405
|
+
|
406
|
+
Add a event handler that is run *only once*. The event handler will
|
407
|
+
be removed after it was fired.
|
408
|
+
|
409
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
410
|
+
|===
|
411
|
+
|Synopsis |Description \| Parameters
|
412
|
+
|
413
|
+
|
|
414
|
+
[source, js]
|
415
|
+
----
|
416
|
+
swiper.once(
|
417
|
+
event,
|
418
|
+
handler
|
419
|
+
);
|
420
|
+
----
|
421
|
+
|
422
|
+
|Add a event handler that is run *only once*. The event handler will
|
423
|
+
be removed after it was fired.
|
424
|
+
|
425
|
+
|===
|
426
|
+
|
427
|
+
[role="mt-4"]
|
428
|
+
[[method-setGrabCursor]]
|
429
|
+
=== setGrabCursor
|
430
|
+
|
431
|
+
Enable|Set a grab cursor on the swiper instance.
|
432
|
+
|
433
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
434
|
+
|===
|
435
|
+
|Synopsis |Description \| Parameters
|
436
|
+
|
437
|
+
|
|
438
|
+
[source, js]
|
439
|
+
----
|
440
|
+
swiper.setGrabCursor();
|
441
|
+
----
|
442
|
+
|
443
|
+
|Enable|Set a grab cursor on the swiper instance.
|
444
|
+
|
445
|
+
|===
|
446
|
+
|
447
|
+
[role="mt-4"]
|
448
|
+
[[method-setProgress]]
|
449
|
+
=== setProgress
|
450
|
+
|
451
|
+
Set Swiper translate progress (from 0 to 1). Where 0 its *initial*
|
452
|
+
position (offset) on *first* slide, and 1 its *maximum* position (offset)
|
453
|
+
on *last* slide.
|
454
|
+
|
455
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
456
|
+
|===
|
457
|
+
|Synopsis |Description \| Parameters
|
458
|
+
|
459
|
+
|
|
460
|
+
[source, js]
|
461
|
+
----
|
462
|
+
swiper.setProgress(
|
463
|
+
progress,
|
464
|
+
speed
|
465
|
+
);
|
466
|
+
----
|
467
|
+
|
468
|
+
|Set Swiper translate progress (from 0 to 1). Where 0 its *initial*
|
469
|
+
position (offset) on *first* slide, and 1 its *maximum* position (offset)
|
470
|
+
on *last* slide.
|
471
|
+
|
472
|
+
progress::
|
473
|
+
Swiper CSS3 translate progress.
|
474
|
+
|
475
|
+
* _Type_: number from 0 to 1
|
476
|
+
* _Default_: *no default*
|
477
|
+
|
478
|
+
|
479
|
+
speed::
|
480
|
+
Transition duration (in ms).
|
481
|
+
|
482
|
+
* _Type_: number
|
483
|
+
* _Default_: *no default*
|
484
|
+
|===
|
485
|
+
|
486
|
+
|
487
|
+
[role="mt-4"]
|
488
|
+
[[method-setTranslate]]
|
489
|
+
=== setTranslate
|
490
|
+
|
491
|
+
Set *custom* values for CSS3 *transform translate* settings of the
|
492
|
+
swiper wrapper.
|
493
|
+
|
494
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
495
|
+
|===
|
496
|
+
|Synopsis |Description \| Parameters
|
497
|
+
|
498
|
+
|
|
499
|
+
[source, js]
|
500
|
+
----
|
501
|
+
swiper.setTranslate(translate);
|
502
|
+
----
|
503
|
+
|
504
|
+
|Set *custom* values for CSS3 *transform translate* settings of the
|
505
|
+
swiper wrapper.
|
506
|
+
|
507
|
+
|===
|
508
|
+
|
509
|
+
[role="mt-4"]
|
510
|
+
[[method-slideNext]]
|
511
|
+
=== slideNext
|
512
|
+
|
513
|
+
Run transition to next slide.
|
514
|
+
|
515
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
516
|
+
|===
|
517
|
+
|Synopsis |Description \| Parameters
|
518
|
+
|
519
|
+
|
|
520
|
+
[source, js]
|
521
|
+
----
|
522
|
+
swiper.slideNext(
|
523
|
+
speed,
|
524
|
+
runCallbacks
|
525
|
+
);
|
526
|
+
----
|
527
|
+
|
528
|
+
|Run transition to next slide.
|
529
|
+
|
530
|
+
speed::
|
531
|
+
Transition duration (in ms).
|
532
|
+
|
533
|
+
* _Type_: number
|
534
|
+
* _Default_: *no default*
|
535
|
+
|
536
|
+
runCallbacks::
|
537
|
+
Set it to false, the transition will not produce transition events.
|
538
|
+
|
539
|
+
* _Type_: boolean
|
540
|
+
* _Default_: `true`
|
541
|
+
|
542
|
+
|===
|
543
|
+
|
544
|
+
[role="mt-4"]
|
545
|
+
[[method-slidePrev]]
|
546
|
+
=== slidePrev
|
547
|
+
|
548
|
+
Run transition to previous slide.
|
549
|
+
|
550
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
551
|
+
|===
|
552
|
+
|Synopsis |Description \| Parameters
|
553
|
+
|
554
|
+
|
|
555
|
+
[source, js]
|
556
|
+
----
|
557
|
+
swiper.slidePrev(
|
558
|
+
speed,
|
559
|
+
runCallbacks
|
560
|
+
);
|
561
|
+
----
|
562
|
+
|
563
|
+
|Run transition to previous slide.
|
564
|
+
|
565
|
+
speed::
|
566
|
+
Transition duration (in ms).
|
567
|
+
|
568
|
+
* _Type_: number
|
569
|
+
* _Default_: *no default*
|
570
|
+
|
571
|
+
runCallbacks::
|
572
|
+
Set it to false, the transition will not produce transition events.
|
573
|
+
|
574
|
+
* _Type_: boolean
|
575
|
+
* _Default_: `true`
|
576
|
+
|
577
|
+
|===
|
578
|
+
|
579
|
+
[role="mt-4"]
|
580
|
+
[[method-slideReset]]
|
581
|
+
=== slideReset
|
582
|
+
|
583
|
+
Reset swiper position to currently *active* slide for the duration equal
|
584
|
+
to `speed` parameter.
|
585
|
+
|
586
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
587
|
+
|===
|
588
|
+
|Synopsis |Description \| Parameters
|
589
|
+
|
590
|
+
|
|
591
|
+
[source, js]
|
592
|
+
----
|
593
|
+
swiper.slideReset(
|
594
|
+
speed,
|
595
|
+
runCallbacks
|
596
|
+
);
|
597
|
+
----
|
598
|
+
|
599
|
+
|Reset swiper position to currently *active* slide for the duration equal
|
600
|
+
to `speed` parameter.
|
601
|
+
|
602
|
+
speed::
|
603
|
+
Transition duration (in ms).
|
604
|
+
|
605
|
+
* _Type_: number
|
606
|
+
* _Default_: *no default*
|
607
|
+
|
608
|
+
runCallbacks::
|
609
|
+
Set it to false, the transition will not produce transition events.
|
610
|
+
|
611
|
+
* _Type_: boolean
|
612
|
+
* _Default_: `true`
|
613
|
+
|
614
|
+
|===
|
615
|
+
|
616
|
+
[role="mt-4"]
|
617
|
+
[[method-slideTo]]
|
618
|
+
=== slideTo
|
619
|
+
|
620
|
+
Run transition to the slide with *index* number equal to the `index` parameter
|
621
|
+
for the duration equal to `speed` parameter.
|
622
|
+
|
623
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
624
|
+
|===
|
625
|
+
|Synopsis |Description \| Parameters
|
626
|
+
|
627
|
+
|
|
628
|
+
[source, js]
|
629
|
+
----
|
630
|
+
swiper.slideTo(
|
631
|
+
index,
|
632
|
+
speed,
|
633
|
+
runCallbacks
|
634
|
+
);
|
635
|
+
----
|
636
|
+
|
637
|
+
|Run transition to the slide with *index* number equal to the `index` parameter
|
638
|
+
for the duration equal to `speed` parameter.
|
639
|
+
|
640
|
+
index::
|
641
|
+
Index number of slide.
|
642
|
+
|
643
|
+
* _Type_: number
|
644
|
+
* _Default_: *no default*
|
645
|
+
|
646
|
+
speed::
|
647
|
+
Transition duration (in ms).
|
648
|
+
|
649
|
+
* _Type_: number
|
650
|
+
* _Default_: *no default*
|
651
|
+
|
652
|
+
runCallbacks::
|
653
|
+
Set it to false, the transition will not produce transition events.
|
654
|
+
|
655
|
+
* _Type_: boolean
|
656
|
+
* _Default_: `true`
|
657
|
+
|
658
|
+
|===
|
659
|
+
|
660
|
+
[role="mt-4"]
|
661
|
+
[[method-slideToClosest]]
|
662
|
+
=== slideToClosest
|
663
|
+
|
664
|
+
Reset swiper position to closest slide/snap point for the duration equal
|
665
|
+
to `speed` parameter.
|
666
|
+
|
667
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
668
|
+
|===
|
669
|
+
|Synopsis |Description \| Parameters
|
670
|
+
|
671
|
+
|
|
672
|
+
[source, js]
|
673
|
+
----
|
674
|
+
swiper.slideToClosest(
|
675
|
+
speed,
|
676
|
+
runCallbacks
|
677
|
+
);
|
678
|
+
----
|
679
|
+
|
680
|
+
|Reset swiper position to closest slide/snap point for the duration equal
|
681
|
+
to `speed` parameter.
|
682
|
+
|
683
|
+
speed::
|
684
|
+
Transition duration (in ms).
|
685
|
+
|
686
|
+
* _Type_: number
|
687
|
+
* _Default_: *no default*
|
688
|
+
|
689
|
+
runCallbacks::
|
690
|
+
Set it to false, the transition will not produce transition events.
|
691
|
+
|
692
|
+
* _Type_: boolean
|
693
|
+
* _Default_: `true`
|
694
|
+
|
695
|
+
|===
|
696
|
+
|
697
|
+
[role="mt-4"]
|
698
|
+
[[method-slideToLoop]]
|
699
|
+
=== slideToLoop
|
700
|
+
|
701
|
+
Does the *same* as method *slideTo()* but in case when used with enabled loop.
|
702
|
+
So this method will slide to slides with realIndex matching to passed index.
|
703
|
+
|
704
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
705
|
+
|===
|
706
|
+
|Synopsis |Description \| Parameters
|
707
|
+
|
708
|
+
|
|
709
|
+
[source, js]
|
710
|
+
----
|
711
|
+
swiper.slideToLoop(
|
712
|
+
index,
|
713
|
+
speed,
|
714
|
+
runCallbacks
|
715
|
+
);
|
716
|
+
----
|
717
|
+
|
718
|
+
|Does the *same* as method *slideTo()* but in case when used with enabled loop.
|
719
|
+
So this method will slide to slides with realIndex matching to passed index.
|
720
|
+
|
721
|
+
index::
|
722
|
+
Index number of slide.
|
723
|
+
|
724
|
+
* _Type_: number
|
725
|
+
* _Default_: *no default*
|
726
|
+
|
727
|
+
speed::
|
728
|
+
Transition duration (in ms).
|
729
|
+
|
730
|
+
* _Type_: number
|
731
|
+
* _Default_: *no default*
|
732
|
+
|
733
|
+
runCallbacks::
|
734
|
+
Set it to false, the transition will not produce transition events.
|
735
|
+
|
736
|
+
* _Type_: boolean
|
737
|
+
* _Default_: `true`
|
738
|
+
|
739
|
+
|===
|
740
|
+
|
741
|
+
[role="mt-4"]
|
742
|
+
[[method-slidesPerViewDynamic]]
|
743
|
+
=== slidesPerViewDynamic
|
744
|
+
|
745
|
+
Get dynamically calculated amount of slides per view. Only useful when
|
746
|
+
property `slidesPerView` set to `auto`.
|
747
|
+
|
748
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
749
|
+
|===
|
750
|
+
|Synopsis |Description \| Parameters
|
751
|
+
|
752
|
+
|
|
753
|
+
[source, js]
|
754
|
+
----
|
755
|
+
swiper.slidesPerViewDynamic();
|
756
|
+
----
|
757
|
+
|
758
|
+
|Get dynamically calculated amount of slides per view.
|
759
|
+
|
760
|
+
[CAUTION]
|
761
|
+
====
|
762
|
+
Only useful when property `slidesPerView` set to `auto`.
|
763
|
+
====
|
764
|
+
|
765
|
+
|===
|
766
|
+
|
767
|
+
|
768
|
+
[role="mt-4"]
|
769
|
+
[[method-translateTo]]
|
770
|
+
=== translateTo
|
771
|
+
|
772
|
+
Animate custom CSS3 *transform' translate* value for swiper wrapper.
|
773
|
+
|
774
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
775
|
+
|===
|
776
|
+
|Synopsis |Description \| Parameters
|
777
|
+
|
778
|
+
|
|
779
|
+
[source, js]
|
780
|
+
----
|
781
|
+
swiper.translateTo(
|
782
|
+
translate,
|
783
|
+
speed,
|
784
|
+
runCallbacks,
|
785
|
+
translateBounds
|
786
|
+
);
|
787
|
+
----
|
788
|
+
|
789
|
+
|Animate custom CSS3 *transform' translate* value for swiper wrapper.
|
790
|
+
|
791
|
+
translate::
|
792
|
+
Translate value (in px).
|
793
|
+
|
794
|
+
* _Type_: number
|
795
|
+
* _Default_: *no default*
|
796
|
+
|
797
|
+
speed::
|
798
|
+
Transition duration (in ms).
|
799
|
+
|
800
|
+
* _Type_: number
|
801
|
+
* _Default_: *no default*
|
802
|
+
|
803
|
+
runCallbacks::
|
804
|
+
Set it to false, the transition will not produce transition events.
|
805
|
+
|
806
|
+
* _Type_: boolean
|
807
|
+
* _Default_: `true`
|
808
|
+
|
809
|
+
translateBounds::
|
810
|
+
Set it to false the transition value can extend beyond min and max translate.
|
811
|
+
|
812
|
+
* _Type_: boolean
|
813
|
+
* _Default_: `true`
|
814
|
+
|
815
|
+
|===
|
816
|
+
|
817
|
+
role="mt-4"]
|
818
|
+
[[method-unsetGrabCursor]]
|
819
|
+
=== unsetGrabCursor
|
820
|
+
|
821
|
+
Disable|Unset a grab cursor on the swiper instance.
|
822
|
+
|
823
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
824
|
+
|===
|
825
|
+
|Synopsis |Description \| Parameters
|
826
|
+
|
827
|
+
|
|
828
|
+
[source, js]
|
829
|
+
----
|
830
|
+
swiper.unsetGrabCursor();
|
831
|
+
----
|
832
|
+
|
833
|
+
|Disable|Unset a grab cursor on the swiper instance.
|
834
|
+
|
835
|
+
|===
|
836
|
+
|
837
|
+
[role="mt-4"]
|
838
|
+
[[method-update]]
|
839
|
+
=== update
|
840
|
+
|
841
|
+
Should called after *add/remove* slides manually, or after *hide/show*
|
842
|
+
a slider, or any custom *DOM modifications* done with Swiper.
|
843
|
+
|
844
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
845
|
+
|===
|
846
|
+
|Synopsis |Description \| Parameters
|
847
|
+
|
848
|
+
|
|
849
|
+
[source, js]
|
850
|
+
----
|
851
|
+
swiper.update();
|
852
|
+
----
|
853
|
+
|
854
|
+
|Should called after *add/remove* slides manually, or after *hide/show*
|
855
|
+
a slider, or any custom *DOM modifications* done with a swiper.
|
856
|
+
|
857
|
+
|===
|
858
|
+
|
859
|
+
|
860
|
+
[role="mt-4"]
|
861
|
+
[[method-updateAutoHeight]]
|
862
|
+
=== updateAutoHeight
|
863
|
+
|
864
|
+
Force swiper to update its height (when `autoHeight` is *enabled*) for the
|
865
|
+
duration equal to `speed` parameter.
|
866
|
+
|
867
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
868
|
+
|===
|
869
|
+
|Synopsis |Description \| Parameters
|
870
|
+
|
871
|
+
|
|
872
|
+
[source, js]
|
873
|
+
----
|
874
|
+
swiper.updateAutoHeight(speed);
|
875
|
+
----
|
876
|
+
|
877
|
+
|Force swiper to update its height (when `autoHeight` is *enabled*) for the
|
878
|
+
duration equal to `speed` parameter.
|
879
|
+
|
880
|
+
speed::
|
881
|
+
Transition duration (in ms).
|
882
|
+
|
883
|
+
* _Type_: number
|
884
|
+
* _Default_: *no default*
|
885
|
+
|
886
|
+
|===
|
887
|
+
|
888
|
+
[role="mt-4"]
|
889
|
+
[[method-updateProgress]]
|
890
|
+
=== updateProgress
|
891
|
+
|
892
|
+
Recalculate swiper progress.
|
893
|
+
|
894
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
895
|
+
|===
|
896
|
+
|Synopsis |Description \| Parameters
|
897
|
+
|
898
|
+
|
|
899
|
+
[source, js]
|
900
|
+
----
|
901
|
+
swiper.updateProgress();
|
902
|
+
----
|
903
|
+
|
904
|
+
|Recalculate swiper progress.
|
905
|
+
|
906
|
+
|===
|
907
|
+
|
908
|
+
[role="mt-4"]
|
909
|
+
[[method-updateSize]]
|
910
|
+
=== updateSize
|
911
|
+
|
912
|
+
Recalculate size of swiper container.
|
913
|
+
|
914
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
915
|
+
|===
|
916
|
+
|Synopsis |Description \| Parameters
|
917
|
+
|
918
|
+
|
|
919
|
+
[source, js]
|
920
|
+
----
|
921
|
+
swiper.updateSize();
|
922
|
+
----
|
923
|
+
|
924
|
+
|Recalculate size of swiper container.
|
925
|
+
|
926
|
+
|===
|
927
|
+
|
928
|
+
[role="mt-4"]
|
929
|
+
[[method-updateSlides]]
|
930
|
+
=== updateSlides
|
931
|
+
|
932
|
+
Recalculate number of slides and their offsets. Useful after *add/remove*
|
933
|
+
slides.
|
934
|
+
|
935
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
936
|
+
|===
|
937
|
+
|Synopsis |Description \| Parameters
|
938
|
+
|
939
|
+
|
|
940
|
+
[source, js]
|
941
|
+
----
|
942
|
+
swiper.updateSlides();
|
943
|
+
----
|
944
|
+
|
945
|
+
|Recalculate number of slides and their offsets. Useful after *add/remove*
|
946
|
+
slides.
|
947
|
+
|
948
|
+
|===
|
949
|
+
|
950
|
+
[role="mt-4"]
|
951
|
+
[[method-updateSlidesClasses]]
|
952
|
+
=== updateSlidesClasses
|
953
|
+
|
954
|
+
Update *active/prev/next* classes on slides and bullets.
|
955
|
+
|
956
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
957
|
+
|===
|
958
|
+
|Synopsis |Description \| Parameters
|
959
|
+
|
960
|
+
|
|
961
|
+
[source, js]
|
962
|
+
----
|
963
|
+
swiper.updateSlidesClasses();
|
964
|
+
----
|
965
|
+
|
966
|
+
|Update *active/prev/next* classes on slides and bullets.
|
967
|
+
|
968
|
+
|===
|
969
|
+
|
970
|
+
[role="mt-4"]
|
971
|
+
[[method-use]]
|
972
|
+
=== updateSlidesClasses
|
973
|
+
|
974
|
+
Installs Swiper modules on a instance at runtime.
|
975
|
+
|
976
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
977
|
+
|===
|
978
|
+
|Synopsis |Description \| Parameters
|
979
|
+
|
980
|
+
|
|
981
|
+
[source, js]
|
982
|
+
----
|
983
|
+
swiper.use(modules);
|
984
|
+
----
|
985
|
+
|
986
|
+
|Installs Swiper modules on a instance at runtime.
|
987
|
+
|
988
|
+
|===
|
989
|
+
|