Open adrianocr opened 4 years ago
I know this is an old issue, but it is still open, so here it goes. This seems like a no brainer, why don't you just wait until instafeed has finished rendering? Instafeed seems to have a callback option 'after', so just run tns inside of that callback function.
Issue description:
I am using instafeed.js to create an instagram feed carousel. Instafeed, instafetch, and other instagram js libraries, all take a DOM element ID, make the instagram calls, and insert the returned images into the element ID you provided.
So I have an empty
<div id="instagramFeed"></div>
element on the page. Instafeed makes its calls and then the above turns intoI'm calling tns on the element like
But what happens here is that since
#instagramFeed
is empty until instafeed.js populates it, the browser console says it couldn't find any slides. And then when I try to .destroy() and .rebuild() tns on the element, it says that tns wasn't found on that element or whatever.So what can I do here? If I place an empty item in the carousel it works but then when I destroy and rebuild tns on the element, the carousel now has an empty slide and the nav behaves weirdly because it's indexed to a wrong number of slides.
Tiny-slider version: Latest Browser name && version: Chrome Beta, Firefox Beta OS name && version: macOS latest, Fedora 31