Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add documentation for new events
  • Loading branch information
Crisfole committed Jul 22, 2014
1 parent 7661194 commit 43516ec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,16 @@ This is how it works:
- `sticky(options)`: Initializer. `options` is optional.
- `sticky('update')`: Recalculates the element's position.

## Events

- `sticky-start`: When the element becomes sticky.
- `sticky-end`: When the element returns to its original location

To subscribe to events use jquery:

```html
<script>
$('#sticker').on('sticky-start', function() { console.log("Started"); });
$('#sticker').on('sticky-end', function() { console.log("Ended"); });
</script>
```

0 comments on commit 43516ec

Please sign in to comment.