Combustion
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Combustion
-
-
Hi,
I have a grid of 6 boxes. I'm trying to get it so that when you click on a box it scales up and centres itself in the middle of the parent div.
Here is what I have so far:
See the Pen yJIBn by hrk (@hrk) on CodePen
I think I can get the current position of the box using .offset()
I'm fairly new to JS and tweenMax - Can anyone point me in the right direction?
Thanks
Neil -
Hi, thanks great thanks. I'll move the tooltip so the mouse never goes over it so i can use the pointer icon.
Cheers
-
-
Yes thats done it thanks!
-
Hi,
New to the javascript version of GSAP but have been using greensock for years
Im trying to basically animate the scale of an image and also the opacity like this:
$(document).ready(function(){ $('.photo').mouseover(function (e){ TweenMax.to($(this), .2, {scaleX:1, scaleY:1, css:{opacity:1}}); }) $('.photo').mouseout(function (e){ TweenMax.to($(this), .2, {scaleX:0.8, scaleY:0.8, css:{opacity:0.7}}); }) })
But it only seems to do the opacity, but if I take out the opacity it does the scale.
am I missing something painfully obvious?thanks
C
Animating a box to centre of a DIV and then back again
in GSAP
Posted
Hi, I have managed to get this to work by setting all the DIVs as being absolute then using TweenMax.set to manually place the boxes in a grid.
Thanks anyway!