added lazy loading
This commit is contained in:
parent
6e1632cd14
commit
8c7d16500a
28
README.md
28
README.md
|
@ -19,19 +19,23 @@ Module for creating "hot lines"
|
||||||
</section>
|
</section>
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
// Initializing an instance of hotline manually
|
import("/js/modules/hotline.mjs").then((hotline) => {
|
||||||
const instance = new hotline(
|
// Imported the hotline.mjs module
|
||||||
'articles',
|
|
||||||
document.getElementById('wrap_articles')
|
|
||||||
);
|
|
||||||
|
|
||||||
// Initializing settings of the hotline instance
|
|
||||||
instance.move = false;
|
|
||||||
instance.wheel = true;
|
|
||||||
instance.delta = 15;
|
|
||||||
|
|
||||||
// Starting the hotline instance
|
// Initializing an instance of hotline manually
|
||||||
instance.start();
|
const instance = new hotline.default(
|
||||||
|
'articles',
|
||||||
|
document.getElementById('wrap_articles')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Initializing settings of the hotline instance
|
||||||
|
instance.move = false;
|
||||||
|
instance.wheel = true;
|
||||||
|
instance.delta = 15;
|
||||||
|
|
||||||
|
// Starting the hotline instance
|
||||||
|
instance.start();
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
Loading…
Reference in New Issue