jquery hide() method not working
巴扎黑
巴扎黑 2017-06-17 09:16:52
0
1
929

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?

巴扎黑
巴扎黑

reply all(1)
三叔

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!