All the options must be passed in the initialization and will be available at track.options
$(".slider-container").silverTrack({
perPage: 4,
itemClass: "item",
mode: "horizontal",
autoHeight: false,
cover: false,
duration: "slow",
easing: "swing"
});
name | description | default |
---|---|---|
perPage | The amount of itens to display | 4 |
itemClass | The class name that will be used to find the item | item |
mode | The direction of pagination (horizontal or vertical) | horizontal |
animationAxis | The direction of the animation (x or y). To animate in "y" axis you will need the mode "vertical" too | x |
autoHeight | If it will adjust the track height after each pagination | false |
cover | When set to true, the plugin will consider the first page as a cover and will consider it as one item | false |
easing | Animation function used by SilverTrack. This function will be used by $.animate, so you could use any plugin that adds easing functions. Ex: jQuery Easing | swing |
duration | The duration used by the animation function | 600 |
animateFunction | If set this function will be used instead of $.animate. The function will receive movement, duration, easing and afterCallback. The movement object will be {left: someNumber} or {height: someNumber}. For an example of how to replace the animation function take a look at css3 animation plugin | null |
Using:
{itemClass: "my-item", cover: true, easing: "easeInOutQuad", duration: 600}
Using:
{itemClass: "small-item", perPage: 5, mode: "vertical"}
Using:
{itemClass: "small-item", perPage: 5, mode: "vertical", animationAxis: "y"}
Using:
{itemClass: "small-item", cover: true, perPage: 5, mode: "vertical", animationAxis: "y"}