Here is a snippet of code showcasing CSS transitions applied to the height property. It seems that CSS transitions work asynchronously, but I am curious if there's a way to make them synchronous without using jQuery or other methods.
CSS:
.animated {
-webkit-transform-style: preserve-3d;
-webkit-transform: translate3d(0px,0px,0px);
transition: height 1.5s;
-webkit-transition: height 1.5s;
-webkit-perspective: 1500;
-webkit-backface-visibility: hidden;
}
HTML:
<div id='someElement' class='animated'></div>
JavaScript:
$("#someElement").css("height","200px");
//Additional JavaScript code to run after the completion of CSS animation