This example shows how to use the Swiper's methods and events.
Example Source on GitHub
Demo
Methods
Events
Note: There are more events than those demonstrated here, like
onDragStart
, onDrag
, onDragEnd
.
Description
-
Responsive Width. Predefined height but width is
adjusted automatically.
-
Using Methods. Demonstrates the use of methods for navigation.
-
Tracking Events. Demonstrates how to listen to events.
-
Transition. Transition speed is set to 600ms (is
auto-adjusted to the remaining transition distance).
-
Touch and Mouse. Swipe with either touch or mouse.
-
Cursor. Changes cursor during drag.
-
Cancel. Esc-key or window loosing focus cancels the drag.
-
Scroll Prevention. Detects if the user swipes
horizontally or scrolls vertically.
-
Resistant Bounds. Increases resistance on left and
right bounds to indicate that user reached the end.