Handling CSS Transitions with prepareTransition - Snook.ca
The author presents a jQuery plugin called prepareTransition that solves the problem of transitioning elements that need to use display:none or visibility:hidden—properties that aren't animatable in CSS. The plugin applies a temporary is-transitioning class with display:block !important to keep the element visible during the opacity fade, then removes the class via the transitionEnd event, allowing display:none to take effect after the animation completes. This approach maintains backward compatibility with browsers that don't support CSS transitions while enabling smooth animations in those that do.