LM_READIMGMODE.JSPC Single-page carousel read graph mode component, 0 dependent!
GitHub:http://dtdxrk.github.io/LM-ReadImgMode/
Txt
1. New version 2.0, out of the dependency on jquery, only 2k after compression.
2. The logic layer is completely detached from the business, with no thumbnail scrolling function, only the underlying paging function.
3. External interface method is added.
Works
Mobile China Photo Gallery
Car Reviews-Article picture page
Cdn
Http://dtdxrk.github.io/LM_ReadImgMode/LM_ReadImgMode-min.js
Demo
Example Demo
Use
Generate an instance of a single-page carousel Read Graph component
var box = new Lm_readimgmode ({ imgid: @sting,//Carousel Image ID * required aimg: @Array, //array of carousel image URL * required Isauto: @Boo Le //whether AutoPlay (default or omitted to pause)});
The current number of pages starts from 1
Box.page = number;
Total pages
Box.tote = number;
Jump to Number page
Box.jump (number)
Page Turn start (FN performs the method before the page starts)
Box.onpagestart (FN);
End of page Turn (FN performs the method after the page turn ends)
Box.onpageend (FN);
Last photo
Box.prev ();
Next one
Box.next ();
Previous Header event (FN executes the required method)
Box.prevend (FN);
Next Header event (FN executes the required method)
Box.nextend (FN);
Whether to play automatically (set Boolean value)
Box.isauto = false;
AutoPlay time (default 6000 milliseconds)
Box.autotime = 6000;
Auto Play
Box.autoplay ();
Auto Play Pause
Box.autostop ();
Lm_readimgmode.js PC Single-page carousel read graph mode component, 0 dependent!