hey, I'm trying to make a section disappear on click and another one show up. Setting the opacity to 0 goes smoothly but then the visibility of section2 goes super fast while I'd like it to be as slow as the first one.
var section1 = document.getElementById("section1");
var section2 = document.getElementById("section2");
document.addEventListener("click", function(){
var tl = new TimelineLite();
tl.add( TweenLite.to(section1, 1, {opacity:0 , ease: Power0.easeNone}) );
tl.add( TweenLite.to(section2, 1, {visibility:'visible', ease: Power0.easeNone}) );
});
my css is currently this:
selector {
overflow-y: hidden;
}
#section2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
visibility: hidden;
}
Sorry if this seem stupid I'm new to all this.
thanks