Example of jquery scrollable infinite seamless loop rolling

Source: Internet
Author: User
Tags prev

1, Plug-in Introduction

Supports infinite seamless loop scrolling.
The smallest operation DOM, which replicates the DOM only once during initialization, and then does not manipulate the DOM to maximize performance.
The default DOM structure is: #demo >ul>li*n.
Rich configuration, simple interface.
Note: Seamless scrolling does not support Prev, next operations, OnBeforeChange, OnAfterChange callbacks are not supported.

2, plug-in parameters

Default parameters
$.fn.scrollable = {
Content Area Selector
ContentSelector: "UL",
width, more than hidden
Width: "Auto",
Height, more than hidden
Height: "Auto",
Scrolling direction
Direction: "Top",
Number of items per scroll
If 1, scroll 1 at a time, and it will be the end of an item when paused
If 0, then seamless scrolling, the pause may be in the middle of a project
Scrollnum:1,
Delay Time
delay:2000,
Animation time, if the number of scrolling is 0, then the full amount of animation time is scrolled
duration:678,
Whether to play automatically
Isautoplay:true,
Whether to hover over a mouse pause
Ishoverpause:true,
Callback before change
ONBEFORECHANGE:EMPTYFN,
Callback after change
Onafterchange:emptyfn
};

3, Plug-in control

3.1. Scroll to
$ ("#demo"). Scrollable (index[, duration][, callback]);

3.2, play
$ ("#demo"). Scrollable ("play");

3.3. Suspend
$ ("#demo"). Scrollable ("pause");

3.4, former
$ ("#demo"). Scrollable ("prev");

3.5, after
$ ("#demo"). Scrollable ("Next");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.