Home > Web Front-end > JS Tutorial > body text

jQuery determines whether an element is hidden code_jquery

WBOY
Release: 2016-05-16 18:07:29
Original
928 people have browsed it

Core code:

Copy code The code is as follows:

if($("#elem_id") .is(":hidden"))
{
}

Example code 1:
Copy code The code is as follows:




New Document



















jquery determines whether the div hides the instance
Copy code The code is as follows:





Binding function

<script> <br>$(document).ready(function(){ <br>var temp= $("#test").is( ":hidden");//Whether it is hidden<br>var temp1= $("#test").is(":visible");//Whether it is visible<br>alert(temp); <br>alert(temp1 ) ; <br>}); </script>


Refresh test





Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template