Switch box written with jQuery ( jQuery version >= 1.8 )
First run npm install
then run gulp serve
gulp build
In your user config file:
$('your images container selector').switchBox({
speed: 4000,
method: 'fade',
isLoop: true,
imgs: {
url: [
'images/img1.jpg',
'images/img2.jpg',
'images/img3.jpg'
],
destUrl: [],
altText: []
}
});
speed
the speed which images switch with. Default: 4000ms
method
the way images switch in. Default: fade
isLoop
let the switch box loop or not. Default: true
imgs.urls
your imgs. Default: []
imgs.destUrl
where to go when clicking on the image. Default: []
imgs.altText
the alt info of your imgs. Default: []
Release under the MIT license.