VanillaRoulette.js - vanilla JavaScript library, which designed to rotate horizontal roulettes
You can see demo here :)
Using VanillaRoulette.js is really simple:
- Link
CSSandJSto your page:
<link href="libs/vanillaRoulette/vanillaRoulette.min.css" rel="stylesheet">
<script src="libs/vanillaRoulette/vanillaRoulette.min.js"></script>- Create a container for roulette and fill it with content blocks (you can use any tag filled with any content):
<div id="roulette">
<div>...</div>
<div>...</div>
<div>...</div>
<div>...</div>
</div>- Initialize the roulette (simply pass a unique selector to the
Rouletteconstructor):
let roulette = new Roulette("#roulette");- Profit
VanillaRoulette has a number of configurable options, so you're welcome to visit our Wiki!)