49 lines
1.5 KiB
Markdown
49 lines
1.5 KiB
Markdown
# hotline.mjs
|
|
Module for creating "hot lines"
|
|
|
|
## Example
|
|
```html
|
|
<section id="wrap" style="display: flex">
|
|
<!-- First element -->
|
|
<article>
|
|
<h3>Place</h3>
|
|
</article>
|
|
|
|
<!-- Second element -->
|
|
<div>
|
|
<p>here</p>
|
|
</div>
|
|
|
|
<!-- Third element -->
|
|
<a>anything</a>
|
|
</section>
|
|
```
|
|
```js
|
|
import("/js/modules/hotline.mjs").then((module) => {
|
|
// Imported the hotline.mjs module
|
|
|
|
// Initializing an instance of the hotline.mjs
|
|
const instance = new module.hotline(document.getElementById('wrap'));
|
|
|
|
// Initializing settings of the hotline instance
|
|
instance.alive = false;
|
|
instance.wheel = true;
|
|
instance.delta = 15;
|
|
|
|
// Starting the hotline instance
|
|
instance.start();
|
|
});
|
|
```
|
|
|
|
## Preview
|
|
### Site of the Svoboda anarchist organization [svoboda/works](https://git.mirzaev.sexy/svoboda/works)
|
|
<br><br>
|
|
### Telegram chat-robot market [mirzaev/arming](https://git.mirzaev.sexy/mirzaev/arming)
|
|
<br><br>
|
|
### Large project, marketplace system [mirzaev/skillparts](https://git.mirzaev.sexy/mirzaev/skillparts)
|
|
but the example is taken from another project that was copied and corrupted by another programmer<br><br>
|
|
<br><br>
|
|
### Pen in the [CodePen](https://codepen.io/mirzaev-sexy/pen/gOzBZOP)<br><br>
|
|

|
|

|
|
 |