I am trying to steer clear of using the animation
property because it tends to be slower compared to CSS3 animations.
My query is whether utilizing the css
method is faster than the animation
property, but still slower than a direct CSS3 animation with transform3d
.
$(this).animate({'opacity' : 'show', 'top' : topPosition+'px'});
vs
$(this).css('top', topPosition+'px');
It's worth noting that I can't use css3 transform3d
directly because I require the dynamically generated position parameter.
CSS
#flashMessage{
position: relative;
transition: all 1.4s ease-in-out;
-webkit-transition: all 1.4s ease-in-out; /** Chrome & Safari **/
-moz-transition: all 1.4s ease-in-out; /** Firefox **/
-o-transition: all 1.4s ease-in-out; /** Opera **/
}