Parameter (Parameters) |
Type (types) |
Default Value (Defaults |
Example (example) |
Description (note) |
Speed |
Number |
300 |
600 |
Duration between slides slider animations (unit ms) |
Eventtarget |
String |
' Wrapper ' |
' Container ' |
Swipers Event objects, all touch events in the default state can only be used for wrapper. You can use ' container ' if you need other elements to be included in the container and use Swipers. 2.4.2 Version New |
AutoPlay |
Number |
5000 |
- |
Transition delay Time (unit ms), the parameter is not specified in the case, does not take effect, (supplemental: When the user operation after the AutoPlay failure) |
Autoplaydisableoninteraction |
Boolean |
True |
False |
When set to False, after the user action (Swipes,arrow and pagination click) AutoPlay will not be banned, the user will restart AutoPlay each time after the operation. |
Autoplaystoponlast |
Boolean |
False |
True |
When set to false AutoPlay is invalidated under the last block (without setting the loop) |
Mode |
String |
' Horizontal ' |
' Vertical ' |
Slides sliding mode, horizontal or vertical |
Loop |
Boolean |
False |
True |
True for loop mode to take effect |
Loopadditionalslides |
Number |
0 |
2 |
Number of slides increased in loop mode |
Loopedslides |
Number |
1 |
2 |
Using Slidesperview: ' Auto ' in loop mode, you need to use this parameter to set the number of loop you want to use |
Slidesperview |
Number or ' auto ' |
1 |
4 |
In rotation mode, set the number of slides that the slider ' s container can display at the same time. In addition, the ' auto ' value is supported, and the number of slides is adjusted according to the container width of the container. ' Auto ' is not compatible with loop mode |
Slidesperviewfit |
Boolean |
True |
False |
This parameter takes effect only if Slidesperview: ' Auto ' is set, and when the width of the slides is greater than the container. The default is true and then the width-wide slide transition is divided into two parts of the edge. When false, the slide transition is divided into multiple slides that are larger than the container container |
Slidespergroup |
Number |
1 |
2 |
Defines the number of slides as a group, valid in rotation mode. (Carousel mode) |
Calculateheight |
Boolean |
False |
True |
When the value is true, Swiper calculates the container height based on the slides content. Very useful in a responsive layout or when you don't know the slides height (like a picture in response) |
Roundlengths |
Boolean |
False |
True |
True, swiper the width and height, which is useful when the error is included in the response slider. |
Csswidthandheight |
Boolean |
False |
True |
Value is true and container,wrapper and slides in Swiper are not highly |
Updateformelements |
Boolean |
True |
False |
Swiper is reinitialized when all inline images (img tags) have been loaded and completed. |
Watchactiveindex |
Boolean |
False |
True |
The index of the active block is dynamically computed when the touchscreen event is enabled. |
Visiblilityfullfit |
Boolean |
False |
True |
If enabled, only "visible" slides will eventually fit in the container size |
AutoResize |
Boolean |
True |
False |
False, when the window size changes, the slides adaptive |
Domanimation |
Boolean |
True |
False |
Whether to use custom Dom animations on browsers that do not support CSS transitions (ie7-9) |
Resistance |
Boolean or "100%" |
True |
False |
Disables resistant bounds (resistance bounce) When set to ' 100% ' when resistant (resistance) mode is enabled when the value is False |
Noswiping |
Boolean |
False |
True |
True, the slide of the element is swiper when the new class "Noswipingclass" Slider is added. |
Preventlinks |
Boolean |
True |
False |
Disable <a> label links when Touch slider (slides) is enabled |
Preventlinkspropagation |
Boolean |
False |
True |
Set the value to True if you want to disable stoppropagation with preventlinks in the sliding process |
Initialslide |
Number |
2 |
0 |
Index of Initial block (page) |
Usecss3transforms |
Boolean |
True |
False |
False disables CSS3 transforms (reduces memory, improves performance, and reduces beauty) while using wrapper left/top properties instead. |