We have a infinite scroll page where new script tiles ( HTML) are appended to the document as user scrolls down the page. The Kite button as given in the sample does not render on the dynamically added HTML tiles. It works fine on the initial set of tiles that get rendered as part of page load.
Looks like the publisher JS does not attach to the dynamically added elements to the page and attaches only to the item available initially on document.ready. What is the fix/workaround to get past it?
Thanks, I just verified it and it still does not work. Cache has been cleared before it was retried. Please check http://ww2.eazyequity.com/, we have published the update though it is not working. Scroll down post 12th tile to see the issue.
That's quite strange. I was trying to inspect events attached to elements on your page using the Chrome inspector, but it shows no events whatsoever, which is strange.
There's a button by default, then a new button is appended dynamically using jQuery.append() every second, and you can see that the buttons work. There must be some JS on your page that is causing the Publisher JS (and the Chrome event inspector) to malfunction. Can you test the buttons in isolation from the bulk of the JS you have?
Well, its a simple HTML append that we use ( not in jQuery though). Please note that the buttons which does not render does not have the kite-buy class applied. The same page works if all tiles are loaded on page load, see an example @ http://ww2.eazyequity.com/Home/TopGainers
Your script's using jQuery to append the HTML and not the DOM methods directly. From your page: $('.resultgrid').append(data);
The test page we setup uses the same routine to keep appending buttons. There must be something on your page that's interfering with the library. It'd be great if you could try to test this in isolation.
Here's a test page that replicates your page's functionality -- https://kite.trade/test.html.
There's a button by default, then a new button is appended dynamically using jQuery.append() every second, and you can see that the buttons work. There must be some JS on your page that is causing the Publisher JS (and the Chrome event inspector) to malfunction. Can you test the buttons in isolation from the bulk of the JS you have?
$('.resultgrid').append(data);
The test page we setup uses the same routine to keep appending buttons. There must be something on your page that's interfering with the library. It'd be great if you could try to test this in isolation.