Share Posted January 12, 2016 I'm having a bit of trouble animating elements that are loaded through JavaScript. Specifically, I was using Jason Mayes Twitter Post Fetcher to load tweets into my page. However, when I try to animate the username, tweets, or any other elements that it loads, I am unable to. I am sure my timeline and tweens are working properly, because when I add in static elements, they target the proper elements. Is there anyway to target elements loaded via JS? See the Pen EPXQOG by anon (@anon) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 12, 2016 Hi Fakebook you should to define Tweens after appending ( when the new dom objects is ready ) , seems there's " customCallback " in that config object , and you can use that . See the Pen Ioype by jasonmayes (@jasonmayes) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted January 12, 2016 Hi Fakebook you should to define Tweens after appending ( when the new dom objects is ready ) , seems there's " customCallback " in that config object , and you can use that . See the Pen Ioype by jasonmayes (@jasonmayes) on CodePen Thanks Diaco. Your idea works, but I was hoping there would be a way to do this without callbacks within plugins. I wasn't sure if there was something within GSAP or maybe a smarter way to do this with jQuery or JS. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now