Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add center option and offset option #195

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,18 @@ Slide transition duration in milliseconds [(example)](http://codepen.io/pawelgrz
**`easing`** (string)
It is like a CSS `transition-timing-function` — describes acceleration curve [(example)](http://codepen.io/pawelgrzybek/pen/aWovrB).

**`center`** (boolean)
Determine if slider will be center in the selector or not. Default: false.

**`perPage`** (number or object)
The number of slides to be shown. It accepts a number [(example)](http://codepen.io/pawelgrzybek/pen/bWbVXz) or an object [(example)](http://codepen.io/pawelgrzybek/pen/dWbGyZ) for complex responsive layouts.

**`offset`** (number or object)
An offset applied on slides width based on items per page.
For example, a configuration with perPage = 1 and offset = 0.25 will show in viewport the current slide and 25% of the next slide.
With center attribute enable, it will show 25% of the prev slide, the current slide and 25% of the next slide.
It accepts a number between 0 and 1 and object with value by breakpoint as for **perPage** attribute.

**`startIndex`** (number)
Index (zero-based) of the starting slide [(example)](http://codepen.io/pawelgrzybek/pen/vmBLER).

Expand Down
2 changes: 1 addition & 1 deletion dist/siema.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/siema.min.js

Large diffs are not rendered by default.

Loading