sync transition-duration between CSS and JS