I'm having some problems with dom changes.
I have 20 li elements in my parent ul. I have changed all li content using the following jquery code:
[...document.querySelectorAll('.signature-discount')].map(item => item.innerHTML = '<span class=\"discount-value\">new content</span>');
$(".product-detail").append("<span class='signature-info'>more new content</span>");
In the page that the li are located there is a infinite scroll. The problem is that everytime the user scrolls to the bottom, 20 new elements are added but their content are not affected by my jquery code.
I have tried using DOMSubtreeModified to listen to changes to my ul classname but it did not work as expected. Can you guys help me? The answer can be either jquery or plain javascript.