Skip to content

Commit

Permalink
update: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kovart authored Oct 12, 2019
1 parent 123a9d0 commit 88b41ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Watch an example.

Then you should initialize an instance with a **new** keyword (it's important):
```js
var stickyElement = new Sticksy('.js-sticky-widget')
var stickyEl = new Sticksy('.js-sticky-widget')
// just for demonstration of state handling
stickyEl.onStateChanged = function (state) {
if(state === 'fixed') stickyEl.nodeRef.classList.add('widget--fixed')
Expand All @@ -98,7 +98,7 @@ That's all 😎

Also, you can directly pass the target node:
```js
var stickyElement = new Sticksy(document.getElementById('sticky-widget'))
var stickyEl = new Sticksy(document.getElementById('sticky-widget'))
```
------

Expand Down

0 comments on commit 88b41ab

Please sign in to comment.