Transfer multiple elements into slide in one magic.
npm install --save jquery-tinyslide
bower install --save jquery-tinyslide
Since this package acts as a jQuery extension, it depends on jQuery. Be sure that you have jQuery installed properly before requiring it.
if you install it with npm, you can just:
otherwise you could require your own asset management tool(ex. sprocket) if you install it with bower.
tinyslide now should work as expected as a jQuery extension!
Now we can register DOM element which we would like it be a slide.
this block above will turn all li element in MYSLIDE element to have slide bebaviour and attribute.
options will be introduced in next section.
startIdx number (default: 0)
Beginning index of toggled elements.
interval number (default: 2000)
Interval time from one to the next.
title string (default: 'li')
Element type of slide to be toggled.
activeClass string (default: 'current')
Class you want to attach when element is active.
$pause DOM Element (default: null)
Set the controll element for controlling lifecycle of the slide. Pause when mouseenter event is triggered, and restart when mouseleave evnet is triggered,
It will be triggered when slide pause.
It will be triggered when slide restart.
It will be triggered when slide finish one rotate.
Check our simple sample.
PR, issue and advice are always welcome.
Check lisence here.