can some one help me to change from hover to click in GSAP Posted November 24, 2022 im new on gsap can someone help me to change this onhover to onclick // Div count var n = $(".child").length; // Div over width var OW = 90 ; TweenMax.set($(".content-image"),{ opacity:0.8, }); TweenMax.set($(".full-content"),{ autoAlpha:0, }); TweenMax.set($(".child"),{width:120/n+'%'}); $(".child").hover(over,out); function over(){ TweenMax.to($(".content-image"),1,{ opacity:0.3, }); TweenMax.to($(".default-content"),0.1,{ autoAlpha:0, }); TweenMax.to($(".full-content"),0.5,{ autoAlpha:1, }); TweenMax.to($(this),1,{ width:OW+'%', }); TweenMax.to($(this).siblings(),1,{ width:(160-OW)/(n-1)+'%', }) } function out(){ TweenMax.to($(".content-image"),1,{ opacity:0.8, }); TweenMax.to($(".child"),1,{ width:120/n+'%', }) TweenMax.to($(".default-content"),0.5,{ autoAlpha:1, }); TweenMax.to($(".full-content"),0.5,{ autoAlpha:0, }); }
can some one help me to change from hover to click
in GSAP
Posted
im new on gsap can someone help me to change this onhover to onclick