Slide. js documentation, slide. js documentation
Framework Code
<! Doctype html>
Basic settings
1. Set width and height (must be defined)
$(function(){ $("#slides").slidesjs({ width: 700, height: 393 });});
The width and height set here do not actually work. The device width is still used. The width needs to be set in the css # slisdes.
2. Set the display starting from that one
$(function(){ $("#slides").slidesjs({ start: 3 });});
Default start: 1
3. Left and right buttons
$ (Function () {$ ("# slides "). slidesjs ({navigation: {active: true, // [boolean] Generates next and previous buttons. generate the next and last buttons. // You can set to false and use your own buttons. You can set false to replace the system button with a self-written button. // User defined buttons must have the following: // previous button: class = "slidesjs-previous slidesjs-navigation" self-written button, class = "" // next button: class = "slidesjs-next slidesjs-navigation" next button class = "" effect: "slide" // [string] Can be either "slide" or "fade ". sliding effect, you can also set it to fade slides }});});
Iv. Paging settings
5. Set the play and stop buttons.
Vi. effect settings
$ (Function () {$ ("# slides "). slidesjs ({effect: {slide: {// Slide effect settings. speed: 200 // [number] Speed in milliseconds of the slide animation .}, fade: {speed: 300, // [number] Speed in milliseconds of the fade animation. crossfade: true // [boolean] Cross-fade the transition. cross magic light effect }}});});
7. Callback Function
Omitted part is not commonly used, see slide. js official homepage http://slidesjs.com/