Hey,
'
I would like to change position of element ".hotspot" based on their additional classes ("hotspot-left", "hotspot-right"). Here's the example to give you the general idea (of course jQuery function hasClass doesn't work):
$(".hotspot").hover(over, out);
TweenMax.set(".popup", { autoAlpha: 0 } );
function over(){
var overTl = new TimelineMax();
overTl
.to($(this).hasClass("hotspot-left"), 0.5, { x: -20, ease: Power2.easeIn } )
.to($(this).hasClass("hotspot-right"), 0.5, { x: 20, ease: Power2.easeIn } )
.to($(this).find(".icon .group"), 0.3, { fill: "#fff", ease: Power3.easeIn } )
.to($(this).find(".popup"), 0.3, { autoAlpha: 1, ease: Power4.easeIn } )
.fromTo($(this).find(".copy"), 0.3, { y: -20, autoAlpha: 0 }, { y: 0, autoAlpha: 1 } )
}
Also, I want to run first two tweens of TimelineMax at the same time - can do this by adding 0 at the end, as I remember?
Thanks in advance!