Sticky helps to keep handy elements on the page while scrolling. Handy for persistent navigation and advertising.
Sticky helps to keep handy elements on the page while scrolling. Handy for persistent navigation and advertising.
type: 'mousewheel mousemove',
align: 'center middle',
wrap: 0,
transition: 'fade',
transitionTime: 300,
startOnItemIndex: 0,
autoEnable: 0,
autoWrap: 1,
autoTime: 8000,
autoPauseOnHover: 1,
pagerEnable: 1,
pagerItemContent: '•',
pagerHide: 1,
pagerHideDelay: 1500
The type of interactive operation(s) allowed.
Default: mousewheel mousemove
How to align the panels within the Swiper element.
Default: center middle
Allow to wrap to the first item when going next from the last (and vice versa).
Default: 0
The style of animation for the panel transition.
Default: fade
The time in miliseconds it takes for the transition to animate.
Default: 300
The index of the first item you want visible when the Swiper initialises.
Default: 0
Enable the auto-swipe functionality.
Default: 0
The time in miliseconds to display each panel before moving on to the next.
Default: 8000
Allow wrapping panel sequence if user reaches start/end. Works the same as wrap but only applies when stepping through each panel through the auto-swipe functionality.
Default: 1
Build the pager element and enable its functionality.
Default: 1
The content to use within the pager item.
Hide the pager when the user moves the mouse cursor outside the Swiper element.
Default: 1
Amount of time to wait before hiding the pager.
Default: 1500
Function to trigger when Swiper has been applied to the element.
Default: function(){}
Function to trigger when Swiper shows a panel.
Default: function(){}
Function to trigger when the auto function of the Swiper has been started.
Default: function(){}
Function to trigger when the auto function of the Swiper has been stopped.
Default: function(){}
Transition to a specific panel element specified by the index within the Swiper's panels (see API Data).
$(element).trigger('swiper_show', [ 5 ]);
Transition to the next panel element. Supports an override to wrap to the first panel if user is at the last panel.
$(element).trigger('swiper_next', [ 1 ]);
Transition to the previous panel element. Supports an override to wrap to the last panel if user is at the first panel.
$(element).trigger('swiper_prev', [ 1 ]);
Show the pager navigation element (if one exists).
$(element).trigger('swiper_pager_show');
Hide the pager navigation element (if one exists).
$(element).trigger('swiper_pager_hide');
Hide the pager navigation element (if one exists) after the delay time.
$(element).trigger('swiper_pager_hidedelay');
Start the auto-swipe function.
$(element).trigger('swiper_auto_play');
Stop the auto-swipe function.
$(element).trigger('swiper_auto_stop');
Specific data about the Swiper element is attached to it using the jQuery.data() or jQuery.fn.data() methods. This data can be both set and retrieved. The purpose of using $.data is so after initialising you can still configure the plugin's functionality.
To view all the data attached to an element, use console.log( $.data(element) );
An array of the Swiper's panel elements.
$.data(element, 'swiperPanels');
The Swiper's pager element.
$.data(element, 'swiperPager');
Set the panel transition animation style.
$.data(element, 'swiperTransition', 'fade');
Set the panel transition animation duration in miliseconds.
$.data(element, 'swiperTransitionTime', 600);
Enable/disable the wrap option.
$.data(element, 'swiperWrap', 1);
Enable/disable the Swiper's auto-swipe functionality.
$.data(element, 'swiperAutoEnable', 1);
The amount of time the auto-swipe function waits before transitioning to the next element.
$.data(element, 'swiperAutoTime', 6000);
Enable/disable the autoWrap option.
$.data(element, 'swiperAutoWrap', 0);
Enable/disable the autoPauseOnHover option.
$.data(element, 'swiperAutoPauseOnHover', 0);