Skip to content

Commit 1eb24f2

Browse files
committed
README typo
README enhancements
1 parent e1d069d commit 1eb24f2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ A **state** method can retrieve the actual body scroll lock status.
133133
const status = bodyScroll.state(); // true when locked...
134134
```
135135

136+
## Constructor Parameter
137+
138+
A padlock instance can be created on every scrollable element.
139+
140+
```javascript
141+
const elementScroll = new ScrollPadlock(document.getElementById('scroller'));
142+
```
143+
136144
## Events
137145

138146
Get notified when scroll **state changes** listening to `scrollpadlocklock` and `scrollpadlockunlock` **events**.
@@ -151,7 +159,7 @@ There's a further `scrollpadlockresize` event dispatched during browser window r
151159

152160
## Positioned elements
153161

154-
If you are experiencing issues with positioned elements remember you can overcome them with the same css variable you used to reserve the scrollbar with on body...
162+
If you are experiencing issues with positioned elements remember you can overcome them with the same css variable you used to reserve the scrollbar width on body...
155163

156164
```css
157165
/* a right positioned sidebar */

0 commit comments

Comments
 (0)