资源说明:A JS slideshow / image slider
jQuery Carousel =============== An image carousel using jQuery ##Usage ###Include jQuery and carousel on your page ###Prepare HTML###Initialise the carousel when the DOM is ready ###Added elements The script will wrap the...around two divs: ###CSS At least the following CSS is needed #carousel1{ overflow:hidden; width:XXpx; height:XXpx; } ###Arrow elements The script will create a couple of arrow elements for you. i.e. . You will need to style this element in CSS. For example: .carousel .arrow{ width:30px; height:30px; position:absolute; top: 40px; } .carousel .previous{ background-image:url('path/to/image.png'); left:0; } .carousel .next{ background-image:url('path/to/image.png'); right:0; } ###Caption The script will also create a caption element . You can also style this element using CSS. For example: .carousel .caption{ background-color: black; position: absolute; top: 80px; left: 0px; color: white; } ##Options The following options are available: **speed** (1000) Speed of transition in milliseconds **auto** (false) If set to true the carousel will play automatically **autoSpeed*** (5000) Interval for automatic play **showMultiple** (true) Show multiple images at the same time in the viewport (Only relevant if images are smaller than the viewport) **centered** (true) Center the image in the viewport (Only relevant if showMultiple is false) **debug** (false) Debug mode, show log messages **btnPrevious** (null) Optional reference to a jquery element to be used as previous button **btnNext** (null) Optional reference to a jquery element to be used as next button **captionElement** (null) Optional reference to a jquery element to be used as container for the captions **counterElement** (null) Optional reference to a jquery element to be used as container for counter ##Callbacks **onChange** Called when the gallery changes to a new image. ##Public Methods startAuto(); stopAuto(); getCurrentIndex(); moveTo(); ##Changelog v.0.6.4 Added public methods startAuto and stopAuto v.0.6.3 Added onChange callback v.0.6.2 Added autoSpeed option v.0.6 Figure tags removed, div added instead. This is to deal with weird behaviour in IE when using figure. v.0.5.3 Extra arguments added: btnPrevious and btnNext v.0.5 Added a 'viewport' element around 'movable' ##Acknowledgements Thanks to [SCT](http://www.sct.com.au/) for the original idea and the time for improvements and bug fixing.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。