Skip to content

Commit

Permalink
fix readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
menxit committed Oct 28, 2017
1 parent f60dfd7 commit 71f60e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ body {
}
```

Then you just include Slideout.js and create a new instance with some options:
Then you just include Slideout.js, create a new instance with some options and call the toggle method:

```html
<script src="dist/slideout.min.js"></script>
Expand All @@ -115,6 +115,11 @@ Then you just include Slideout.js and create a new instance with some options:
'padding': 256,
'tolerance': 70
});
// Toggle button
document.querySelector('.toggle-button').addEventListener('click', function() {
slideout.toggle();
});
</script>
```

Expand Down

0 comments on commit 71f60e7

Please sign in to comment.