Home  >  Article  >  Web Front-end  >  How to make div disappear with jquery

How to make div disappear with jquery

WBOY
WBOYOriginal
2021-11-17 15:50:362063browse

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();".

How to make div disappear with jquery

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();

How to make div disappear with jquery

The output result does not have the hidden code effect:

How to make div disappear with jquery

With the hidden code effect

How to make div disappear with jquery

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn