Global JS and CSS Is not loaded on second page of the shop (pagination)
-
On the Theme Setting, on the Custom CSS and Global Custom JS I added some code. On the Shop page on page load, everything works fine but I have the shop page with pagination when I go to the second page or any other page after that the JS and CSS code isn’t loaded. Is this a bug? How can I fix it?
Hi,
Could you please send us a link to your website where we can see this issue? And indicate please what code is not working correctly.
Kind Regards
Hi,
Yes, because the second page is loaded with AJAX so in fact, the page is reloaded and $(document).ready()
is not triggered. If you want to make this code work, you need to disable AJAX shop function. But it is much easier to change this button with CSS
body.btns-default-dark .widget_price_filter .price_slider_amount .button {
background: rgb(52, 152, 219);
color: white;
}
Regards