Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bchanx committed Dec 19, 2013
1 parent 2b590bc commit c03c3a5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ slidr.create('slidr-id').start();

```javascript
slidr.create('slidr-id', {
after: function(e) { console.log('in: ' + e.in.slidr); },
before: function(e) { console.log('out: ' + e.out.slidr); },
breadcrumbs: true,
controls: 'corner',
direction: 'vertical',
Expand All @@ -76,6 +78,8 @@ Full details on available settings listed below:

| Parameter | Type | Default | Description |
| ------------- |:---------:|:----------:| -----------------------------------------------------------------------------:|
| `after` | _function_| no-op | Callback function after a slide transition finishes. |
| `before` | _function_| no-op | Callback function before a slide transition begins. |
| `breadcrumbs` | _bool_ | false | Show or hide breadcrumbs on start(). `true` or `false`. |
| `controls` | _string_ | border | Show or hide control arrows on start(). `border`, `corner` or `none`. |
| `direction` | _string_ | horizontal | The default direction for new slides. `horizontal` or `h`, `vertical` or `v`. |
Expand All @@ -87,6 +91,23 @@ Full details on available settings listed below:
| `touch` | _bool_ | false | Whether to enable touch navigation for mobile devices. `true` or `false`. |
| `transition` | _string_ | linear | The default transition to apply. `cube`, `linear`, `fade`, or `none`. |

The `before` and `after` callback functions return the following metadata:

```javascript
{
out: {
slidr: "data-slidr-id",
trans: "in-transition",
dir: "in-direction"
},
in: {
slidr: "data-slidr-id",
trans: "out-transition",
dir: "out-direction"
}
}
```

### Global API
The global `slidr` namespace provides the following function calls:

Expand Down

0 comments on commit c03c3a5

Please sign in to comment.