First release the Chinese official address http://be-fe.github.io/iSlider/index.html
This is demo.
As we all know, the mobile side of the picture slider plugin has a lot, why should I recommend this islider?
This plugin attracts me with two points,
One is that it does not rely on jquery and writes with native code. The second is that it is very easy to use, and in addition to the picture, also supports the common DOM elements, sliding way diverse, rich effect.
But it also has some drawbacks, one of which is that it provides too few interfaces.
When you provide some function buttons for your carousel, for example, Previous, Next, AutoPlay, and so on. The use of this plug-in is somewhat inadequate, the button itself is quite inflexible, if you have used, you will agree with me to say. But after I did not forget to look at its source, suddenly have a kind of situations, vista feeling.
I found that in the prototype of the Islider object in the source code, there are many ways to implement some of the features I mentioned above.
I'll give you a detailed explanation here. First, the function of the image carousel is provided by the Islider object, in JS, we just create an instance of the Islider object, and pass some parameters to it, we can implement the Carousel function.
After getting to this instance, suppose this instance is Islider, through Islider.slideindex can know the ordinal of the current picture, this value can be used as a parameter.
There is a method in the instance, Slideto. This method accepts a value that can be slid to the corresponding ordinal of the picture. The total number of images can be obtained from the image information passed to Islider. This parameter is an array.
This makes it possible to implement some functions in the custom button.
In addition, the prototype also provides pause, play and other methods, through these methods, can achieve a lot of functions.
Recommend a mobile phone-side picture Slide plugin Islider