1 | <!DOCTYPE html>
|
2 | <html>
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>AOS - Animate on scroll library</title>
|
6 | <meta name="viewport" content="width=device-width">
|
7 | <link rel="stylesheet" href="css/styles.css" />
|
8 | <link rel="stylesheet" href="../dist/aos.css" />
|
9 | </head>
|
10 | <body>
|
11 | <div id="aos-demo" class="aos-all"></div>
|
12 |
|
13 | <script src="../dist/aos.js"></script>
|
14 | <script>
|
15 | AOS.init({
|
16 | easing: 'ease-in-out-sine'
|
17 | });
|
18 |
|
19 | setInterval(addItem, 300);
|
20 |
|
21 | var itemsCounter = 1;
|
22 | var container = document.getElementById('aos-demo');
|
23 |
|
24 | function addItem () {
|
25 | if (itemsCounter > 42) return;
|
26 | var item = document.createElement('div');
|
27 | item.classList.add('aos-item');
|
28 | item.setAttribute('data-aos', 'fade-up');
|
29 | item.innerHTML = '<div class="aos-item__inner"><h3>' + itemsCounter + '</h3></div>';
|
30 | container.appendChild(item);
|
31 | itemsCounter++;
|
32 | }
|
33 | </script>
|
34 | </body>
|
35 | </html>
|