Skip to content

Commit eda6918

Browse files
committed
updated readme
1 parent 66c4232 commit eda6918

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@
1212
I suggest you to use [jspm](http://jspm.io/) as your package manager.
1313

1414
```js
15-
import $ from "jquery";
1615
import PointerLock from "jspointerlock";
1716

18-
const element = document.body;
19-
const pointerLock = new PointerLock(element);
17+
const pointerLock = new PointerLock(document.body);
2018

2119
pointerLock.on("change", (isLocked) => {
2220
console.log(`pointer is ${isLocked ? 'locked' : 'not locked'}`);
2321
});
2422

25-
$(element).on("click", () => {
23+
pointerLock.element.addEventListener("click", () => {
2624
pointerLock.requestPointerLock();
2725
});
2826
```
@@ -42,6 +40,7 @@ Please checkout the [index-dist.html](https://ardean.github.io/jsPointerLock/ind
4240
- **Static Members**
4341
- _exitPointerLock()_ => **Void**
4442
- **Properties**
43+
- _element_ => **Element**
4544
- _isLocked_ => **Boolean**
4645
- **Static Properties**
4746
- _isSupported_ => **Boolean**

0 commit comments

Comments
 (0)