Hi guys,
I have been working on some banners over the past few days. I have setup an init() function which positions all of the animated images and text (which looks like this):
function initCSS() {
TweenLite.set(("#intro"), {y: 380}),
TweenLite.set(("#titleHolder"), {x: -200}),
TweenLite.set((".t-2"), {x: -200}),
TweenLite.set(("#product1"), {x: -200}),
TweenLite.set(("#product2"), {x: -200}),
TweenLite.set(("#cta"), {x: -200})
}
I have the GS stuff in its own JS file and the CSS and html together in the html file.
GS is brought in at the top of the HTML file and the external JS GS stuff at the bottom.
When the banner is very first loaded all of the stuff which animates above is all out of position and flickers. Its as if the init() is taking a few milliseconds to kick in so its falling back on the standard css for positioning. Text and images are all overlapped etc.
What is the best way to prevent this happening?
Cheers,
Ste