wip
This commit is contained in:
1
public/web/shella/scripts/cs/product-pagination.js
Normal file
1
public/web/shella/scripts/cs/product-pagination.js
Normal file
@@ -0,0 +1 @@
|
||||
document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("pagination-next"),a=document.querySelector('div[data-widget="carousel-container"]');if(e){var n=!1,t=!1;elementAppeared(e,(function(){if(!n&&!t){n=!0,e.innerText="Ýüklenilýär";var r=new URL(location.href);r.searchParams.set("page",new URL(e.href).searchParams.get("page")),r.searchParams.has("sorting")&&r.searchParams.set("sorting",r.searchParams.get("sorting")),history.pushState({},"",r.href),$.ajax(location.href,{success:function(r){r.pagination.next_page_url||(e.style.display="none",t=!0),e.href=r.pagination.next_page_url,a.insertAdjacentHTML("beforeend",r.products),n=!1,new LazyLoad({elements_selector:".lazyload",threshold:100})}})}}))}}));
|
||||
Reference in New Issue
Block a user