Hitting a button displays an element with a Vue transition that attempts to emulate the jQuery slideDown() and slideUp() animations.
It does work for showing the element but the CSS animation fails for hiding the element, in the sense that the hiding is not animated.
What am I doing wrong?
CodePen: https://codepen.io/BCS-5SBX/pen/ExMYdZO
.slide-enter-active,
.slide-leave-active {
transition: 2s;
}
.slide-enter-to {
max-height: 500px;
overflow: hidden;
}
.slide-enter-from,
.slide-leave-to {
overflow: hidden;
max-height: 0;
}
Try with adding
.slide-leave-fromclass on.slide-enter-to: