The main purpose here is to use slideToggle() and slideUp() to display the originally hidden content when the mouse passes over it (.hover()):
Use slideToggle and slideUp to implement. Of course, you can also use hide/show, fadeIn/fadeOut, etc., but the effect is different, the implementation method is still the same. Things to note Yes, you need to add position:relative; to .dropdown to prevent flickering.