If you use $(this).hide(); in a click event, the element will not be hidden.
Then add a parameter speed to hide(), and hide(1) can hide it. Why is this?
There is a saying in w3school "If the element is already fully visible, the effect will not change unless a callback function is specified."
How to understand?
三叔2017-06-17 09:18:52
Add a parameter 1
, which just adds a transition animation with a time span of 1ms
. Without adding parameters, it will be hidden directly.
With no parameters, the .hide() method is the simplest way to hide an element
For the problem described by the subject, it is best to provide a demo, otherwise it will be difficult to follow up