Simple slider with two axes and buttons
npm install axialsliderSimple slider with two axes and buttons
npm i axialslider
``javascript
import axialslider from 'axialslider';
window.addEventListener('load', function () {
axialslider({
class: 'yourclass', // CSS class name, default: axialslider
color: '#19bd9a' // Also you can use rgba
duration: 1000, // Default
delay: 3000 // Default delay between slides
});
});
`
Cross browser way provedes requestAnimationFrame:
`javascript`
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function( / function FrameRequestCallback / callback, / DOMElement Element / element ) {
window.setTimeout( callback, 1000 / 60 );
};
} )();
}
`html`
For vertical slider:
`html`
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request :D