Unify css/js Transition