I think the problem is the second argument that you pass to the hide method. From the jQuery documentation in Hide () it says:
duration A string or number that determines how long the animation will work.
easing A string indicating which easing function to use for the transition.
callback Function to call after animation is complete
The second argument is a javascript object, not a string. He is trying to find a weakening function called {direction: "down"}, and has no luck. The only facilitating implementations in the jQuery library are the default values ββcalled swing, and one that progresses at a constant speed, called linear. You also have what looks like the third parameter, and it should be the first.
I am also wondering why you use the hide () method to create a jQuery slide instead of the slideToggle () method or just slideDown () or slideUp (), as your needs may be.
source share