juggling between media or js transition