Home >Web Front-end >JS Tutorial >Show hidden implementation code analysis in Jquery_jquery

Show hidden implementation code analysis in Jquery_jquery

WBOY
WBOYOriginal
2016-05-16 18:04:271010browse

$("#id").show()//Indicates display:block,
$("#id").hide()//Indicates display:none;
$("#id"). toggle()//Switch the visible state of the element. If the element is visible, switch it to hidden; if the element is hidden, switch it to visible.

$("#id").css('display','none');
$("#id").css('display','block');
//Or
$("#id")[0].style.display = 'none';

//$("#id") returns JQuery12 //It is definitely a collection No display attribute

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