Hi Forum-goers,
I am completely new to this platform and am having a few issues getting my timeline to run all objects at the same time. In my code I am simultaneously running another plugin that counts up numbers, which you can ignore, but I have included in the code any how. What I want to achieve is that all of the bars in the chart animate out at the same time. Any help would be great : )
$(function() {
var tl = new TimelineLite({align: "start"});
tl.to( $(".bar1"), 0.5, {css:{width:"200px"}, ease:Strong.easeInOut});
$('.percentage1').countTo({
from: 0,
to: 75,
speed: 3300,
}),
tl.to( $(".bar2"), 0.5, {css:{width:"150px"}, ease:Strong.easeInOut});
$('.percentage2').countTo({
from: 0,
to: 50,
speed: 3300,
}),
tl.to( $(".bar3"), 0.5, {css:{width:"125px"}, ease:Strong.easeInOut});
$('.percentage3').countTo({
from: 0,
to: 35,
speed: 3300,
}),
tl.to( $(".bar4"), 0.5, {css:{width:"100px"}, ease:Strong.easeInOut});
$('.percentage4').countTo({
from: 0,
to: 25,
speed: 3300,
}),
tl.to( $(".bar5"), 0.5, {css:{width:"75px"}, ease:Strong.easeInOut});
$('.percentage5').countTo({
from: 0,
to: 15,
speed: 3300,
}),
tl.to( $(".bar6"), 0.5, {css:{width:"50px"}, ease:Strong.easeInOut});
$('.percentage6').countTo({
from: 0,
to: 2,
speed: 3300,
});
tl.play()
});
If answering this is easier if you see the HTML, I have hosted that here: http://yaocho-digital.com/customerhub/popular-sizes.html