Swipe Library: Method and Event Usage Examples
Category: ExamplesThe Swipe module is a carousel and rotating banner module that enables the cyclic display of media content such as text, images, videos, and iframes. It supports drag-and-drop scrolling as well as button-click slider switching. It also supports asynchronous content fetching, insertion, and deletion of sliders. The module responds to changes in sliders and the outer container, automatically adjusting the relationships between sliders.
Adding Sliders Simply
Use the add()
method to add sliders, which supports two parameters:
Adding to Specific Position
Use the opts.placement
parameter in the add()
method to customize the insertion position of new sliders.
Removing Sliders
Use the remove()
method to delete sliders, which supports two parameters:
Navigation
Several methods are available for navigating between sliders and pagination: