Add transition duration to change classes.