Call show and hide when using css transition