Home > Article > Web Front-end > How to make div disappear with jquery
Jquery method to make div disappear: 1. Use the "$("id value of div")" statement to obtain the div object according to the specified id value; 2. Use the hide() method to obtain the div object Just hide it, the syntax is "div object.hide();".
The operating environment of this tutorial: windows7 system, jquery1.10.0 version, Dell G3 computer.
How jquery makes div disappear
Create a new html, add the test html to the body and introduce jquery (the jquery here is downloaded To your own local, pay attention to the path)
Add the jquery hidden div code under the script tag. In jquery, you can use the hide() method to hide the div element
The code is as follows:
div对象.hide();
The output result does not have the hidden code effect:
With the hidden code effect
For more programming-related knowledge, please visit: Programming Video! !
The above is the detailed content of How to make div disappear with jquery. For more information, please follow other related articles on the PHP Chinese website!