This topic has 3 replies, 3 voices, and was last updated 3 weeks, 3 days ago ago by Andrew Mitchell
I’m experiencing an issue with AJAX infinite scrolling in the XStore theme on my WooCommerce shop page. My JavaScript code updates product elements when new items are loaded, but it seems that the infinite scroll functionality does not trigger an event I can hook into. Consequently, my custom JavaScript changes aren’t applied to the newly loaded products.
Could you please let me know if there’s a specific event or approach I should use to detect when new products are loaded via infinite scroll in XStore? Alternatively, if there’s a recommended solution for ensuring custom JavaScript applies to all dynamically loaded items, I would greatly appreciate any advice. Could you please let me know if there’s a specific event or approach I should use to detect when new products are loaded via infinite scroll in XStore? Alternatively, if there’s a recommended solution for ensuring custom JavaScript applies to all dynamically loaded items, I would greatly appreciate any advice.
document.addEventListener('ajaxComplete', () => {
updateProductPrices(); // Reapply price modifications here
});
Dear Saleh,
We hope this message finds you well.
You may try using the following events in your implementation:
$(document).on('et_ajax_element_loaded etheme_product_grid_ajax_loaded', function (event, data) {
});
We trust this will be helpful for your needs. Should you require any further assistance, please do not hesitate to reach out.
Best regards,
8Theme Team
Dear saleh,
We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.
Click here to rate now: https://themeforest.net/downloads
Thank you sincerely for your ongoing support!
Best Regards,
The 8Theme Team
The issue related to '‘Issue with AJAX Infinite Scroll Not Triggering JavaScript Updates’' has been successfully resolved, and the topic is now closed for further responses