This is a fairly basic slideshow, written in javascript. This is a dual-purpose project, it's meant to be something you can drop right into your page and use if you so choose, but it's also meant as an example/tutorial script showing how to build a simple
npm install @solid/better-simple-slideshow
1. HTML markup for the slideshow should look basically like this, with a container element wrapping the whole thing (doesn't have to be a <div>) and each slide is a <figure>.
``html`
2. Include the script: js/better-simple-slideshow.min.js or js/better-simple-slideshow.js
3. Include the stylesheet css/simple-slideshow-styles.css
4. Initialize the slideshow:
`html`
as the second argument, as seen below:
`javascriptvar opts = {
//auto-advancing slides? accepts boolean (true/false) or object
auto : {
// speed to advance slides at. accepts number of milliseconds
speed : 2500,
// pause advancing on mouseover? accepts boolean
pauseOnHover : true
},
// show fullscreen toggle? accepts boolean
fullScreen : true,
// support swiping on touch devices? accepts boolean, requires hammer.js
swipe : true
};
makeBSS('.bss-slides', opts);
``