Home  >  Article  >  Web Front-end  >  js method to determine whether an element is hidden_javascript skills

js method to determine whether an element is hidden_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:45:271360browse
Copy code The code is as follows:

if( document.getElementById("div").css("display ")==='none')

if( document.getElementById("div").css("display")==='block')

$("#div ").is(":hidden"); // Determine whether to hide

$("#div").is(":visible")
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