No way to trigger later, i.e. on new Ajax content
Closed this issue · 6 comments
Hi there. I started using this, and it's awesome, but it seems to be built with no way to trigger it on new content added after the DOM is ready, like via Ajax. Any chance of adding some sort of API or function that I can call? Thanks.
Yes, this can be done. I’ll need to test its performance in a development branch. Would you like to test it too? Let me know.
Sure, let me know what I can do.
@Ambient-Impact would you test the script @ https://github.com/jonathantneal/svg4everybody/tree/autotrigger and tell me how it works for you? I’ve included a demo, as well.
At first glance it seems to work perfectly. I'll let you know if anything crops up.
All right, merged. Thanks, @Ambient-Impact! Enjoy.
hi there, is this documented somewhere? looking at the dates, it should be in 1.0.0, right? doesnt work for me though (doing simple DOM modifications, changing the xlink:href attribute...).
thx, great work!
EDIT: OK. this is selfdocumenting. as it just works! replacing xlink:href attributes can obviously not work, as those are no more there when being an IE...so replacing a whole svg tag works, at least for me.