1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 |
|
4 | <head>
|
5 | <meta charset="UTF-8">
|
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8 | <title>Tape Slider</title>
|
9 | <link rel="stylesheet" href="./dist/style/_index.css" />
|
10 | <style>
|
11 | .ts-tapeSlider-container {
|
12 |
|
13 | }
|
14 |
|
15 | .ts-tapeSlider-container .ts-tapeSlider-item {
|
16 |
|
17 | }
|
18 | </style>
|
19 | </head>
|
20 |
|
21 | <body>
|
22 | <div class="ts-tap">
|
23 |
|
24 | </div>
|
25 | <div class="ts-tap2">
|
26 |
|
27 | </div>
|
28 | <script src="./dist/index.js"></script>
|
29 | <script src="./mocks.js"></script>
|
30 | <script>
|
31 | const t = tapeSlider.make(".ts-tap", { speed: 1, data: { itemsData: data } });
|
32 |
|
33 | t.onStarted().subscribe((e) => {
|
34 | console.log("started");
|
35 | });
|
36 | t.onStopped().subscribe((e) => {
|
37 | console.log("stopped");
|
38 | });
|
39 | t.onTick().subscribe((tick) => {
|
40 | console.log("tick" + tick);
|
41 | });
|
42 |
|
43 | t.boot();
|
44 |
|
45 | const t2 = tapeSlider.make(".ts-tap2", { speed: 10, data: { itemsData: data } });
|
46 |
|
47 | t2.onStarted().subscribe((e) => {
|
48 | console.log("started");
|
49 | });
|
50 | t2.onStopped().subscribe((e) => {
|
51 | console.log("stopped");
|
52 | });
|
53 | t2.onTick().subscribe((tick) => {
|
54 | console.log("tick" + tick);
|
55 | });
|
56 |
|
57 | t2.boot();
|
58 | </script>
|
59 | </body>
|
60 |
|
61 | </html> |
\ | No newline at end of file |