Skip to content

Commit

Permalink
update readme, version
Browse files Browse the repository at this point in the history
  • Loading branch information
ganlanyuan committed Aug 3, 2017
1 parent 3ba3fff commit 46dc3eb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tiny-slider 2.0
![version](https://img.shields.io/badge/Version-2.0.1-green.svg)
![version](https://img.shields.io/badge/Version-2.0.2-green.svg)
Tiny slider for all purposes, inspired by [Owl Carousel](https://owlcarousel2.github.io/OwlCarousel2/).
[Demos](http://ganlanyuan.github.io/tiny-slider/tests/index.html)

Expand Down Expand Up @@ -74,7 +74,7 @@ import { tns } from "path/to/src/tiny-slider.module"
```html
<script>
var slider = tns({
container: document.querySelector('.my-slider'),
container: '.my-slider',
items: 3,
slideBy: 'page',
autoplay: true
Expand All @@ -86,7 +86,7 @@ import { tns } from "path/to/src/tiny-slider.module"

| Option | Type | Description |
| --- | --- | --- |
| `container` | Node | Default: `document.querySelector('.slider')`. <br> The slider container element. |
| `container` | Node \| String | Default: `document.querySelector('.slider')`. <br> The slider container element or selector. |
| `mode` | `'carousel'` \| `'gallery'` | Default: `'carousel'`. <br> Controls animation behaviour. <br> With `carousel` everything slides to the side, while `gallery` uses fade animations and changes all slides at once. |
| `axis` | `'horizontal'` \| `'vertical'` | Default: `horizontal`. <br> The axis of the slider. |
| `items` | Integer | Default: `1`. <br> Number of slides being displayed. |
Expand All @@ -96,17 +96,17 @@ import { tns } from "path/to/src/tiny-slider.module"
| `slideBy` | Integer \| `'page'` | Default: `1`. <br> Number of slides going on one "click". |
| `controls` | Boolean | Default: `true`. <br> Controls the display and functionalities of `controls` components (prev/next buttons). If `true`, display the `controls` and add all functionalities. |
| `controlsText` | (Text \| Markup) Array | Default: `['prev', 'next']`. <br> Text or markup in the prev/next buttons. |
| `controlsContainer` | Node \| `false` | Default: `false`. <br> The container element around the prev/next buttons. |
| `controlsContainer` | Node \| String \| `false` | Default: `false`. <br> The container element/selector around the prev/next buttons. |
| `nav` | Boolean | Default: `true`. <br> Controls the display and functionalities of `nav` components (dots). If `true`, display the `nav` and add all functionalities. |
| `navContainer` | Node \| `false` | Default: `false`. <br> The container around the dots and the autoplay start/stop button. |
| `navContainer` | Node \| String \| `false` | Default: `false`. <br> The container element/selector around the dots and the autoplay start/stop button. |
| `arrowKeys` | Boolean | Default: `false`. <br> Allows using arrow keys to switch slides. |
| `speed` | Integer | Default: `300`. <br> Speed of the slide animation (in "ms"). |
| `autoplay` | Boolean | Default: `false`. <br> Toggles the automatic change of slides. |
| `autoplayTimeout` | Integer | Default: `5000`. <br> Time between 2 `autoplay` slides change (in "ms"). |
| `autoplayDirection` | `'forward'` \| `'backward'` | Default: `'forward'`. <br> Direction of slide movement (ascending/descending the slide index). |
| `autoplayText` | Array (Text \| Markup) | Default: `['start', 'stop']`. <br> Text or markup in the autoplay start/stop button. |
| `autoplayHoverPause` | Boolean | Default: `false`. <br> Stops sliding on mouseover. |
| `autoplayButton` | Node \| `false` | Default: `false`. <br> The autoplay start/stop button. |
| `autoplayButton` | Node \| String \| `false` | Default: `false`. <br> The autoplay start/stop button or selector. |
| `autoplayResetOnVisibility` | Boolean | Default: `true`. <br> Pauses the sliding when the page is invisiable and resumes it when the page become visiable again. ([Page Visibility API](https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API)) |
| `animateIn` | String | Default: `'tns-fadeIn'`. <br> Name of intro animation `class`. |
| `animateOut` | String | Default: `'tns-fadeOut'`. <br> Name of outro animation `class`. |
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-slider",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/ganlanyuan/tiny-slider",
"authors": [
"WilliamLin <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-slider",
"version": "2.0.1",
"version": "2.0.2",
"description": "Vanilla javascript slider for all purposes, inspired by Owl Carousel.",
"main": "dist/tiny-slider.js",
"directories": {
Expand Down

0 comments on commit 46dc3eb

Please sign in to comment.