Hi--
Just getting started with the JS version, but a long, long time user of the AS version, I'm having some trouble understanding selectors.
I made a quick sample to learn the syntax and got this to work:
$(function() {
CSSPlugin.defaultTransformPerspective = 1000;
TweenMax.set(cow, {rotationX: 90, transformOrigin:"left top"});
$( "#btn" ).click(function() {
TweenMax.to(cow, 4, {rotationX:0, ease:Elastic.easeOut});
});
});
I'm not defining "cow" to be anything, but it does exist as an ID to a div. Great, I thought. Very easy, but when I try this on another file it didn't work. Same version of JQ and GSAP (TweenMax), but no go.
So I tried this:
var one = document.getElementById("one");
TweenLite.set(one, {left:300, top: "100px", transformPerspective: 600, rotationY:-10});
And it worked. Well, okay. Still, I started a third file and neither of these worked again. I had t to resort to:
photos=new Array("#photo1","#photo2","#photo3");
TweenMax.set(photos[0], {transformOrigin:"left top"});
All using the same version of JQuery and TweenMax. What gives?
Also, is there a reason I can only animate my divs when the images are in the background and not the foreground?
Thank you!