1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| {{ 'infinite-scroll.pkgd.min.js' | asset_url | script_tag }} <script> (function() { // init InfiniteScroll function initInfScroll() { let elem = document.querySelector('#product-grid'); let infScroll = new InfiniteScroll( elem, { // options path: '.pagination__next', append: '.product-grid .grid__item', status: '.scroller-status', hideNav: '.pagination-wrapper', history: false }); infScroll.on( 'last', function( body, path ) { let status = document.querySelector('.scroller-status'); status.remove(); }); } // run InfiniteScroll initInfScroll(); // re-bind InfiniteScroll when new items inserted let elem = document.querySelector('#ProductGridContainer'); elem.addEventListener("DOMNodeInserted", function (e) { try { initInfScroll(); } catch (error) { } }, false); })(); </script> <style> .loader-ellips { font-size: 20px; /* change size here */ position: relative; width: 4em; height: 1em; margin: 10px auto; } .loader-ellips__dot { display: block; width: 1em; height: 1em; border-radius: 0.5em; background: #555; /* change color here */ position: absolute; animation-duration: 0.5s; animation-timing-function: ease; animation-iteration-count: infinite; } .loader-ellips__dot:nth-child(1), .loader-ellips__dot:nth-child(2) { left: 0; } .loader-ellips__dot:nth-child(3) { left: 1.5em; } .loader-ellips__dot:nth-child(4) { left: 3em; } @keyframes reveal { from { transform: scale(0.001); } to { transform: scale(1); } } @keyframes slide { to { transform: translateX(1.5em) } } .loader-ellips__dot:nth-child(1) { animation-name: reveal; } .loader-ellips__dot:nth-child(2), .loader-ellips__dot:nth-child(3) { animation-name: slide; } .loader-ellips__dot:nth-child(4) { animation-name: reveal; animation-direction: reverse; } </style>
|