Why the code is not executed in turn? Does at the same time. How can he be forced to perform a first turn, then an increase in the height and width of the .cube container, and then an increase in the height and width at the very side of #side2 (for example). The delay property does not work, I don’t know why, maybe I’m putting it there. Please tell me if you can.
Js:
$(".link2").on("click", function() { $('.cube').css("transform", "rotate3d(0,1,0,270deg)"); $('.main-cube').css("top", "10%"); $(".cube").addClass("active-cube"); $('#side2').delay(2500) .animate({ width: "90vw" }, 1000 ) .animate({ height: "90vh" }, 1000 ); }); CSS:
.active-cube { width: 90vw; height: 45vh; }
.cube- Yuri