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

jquery 设置style:display的方法_jquery

WBOY
Release: 2016-05-16 16:17:13
Original
1420 people have browsed it

("#id").css('display','none');
$("#id").css('display','block');


$("#id")[0].style.display = 'none';
$("#id")返回的是JQuery

它是个集合肯定有display属性

$("#id").show()表示display:block, $("#id").hide()表示display:none; $("#id").toggle()切换元素的可见状态。如果元素是可见的,切换为隐藏的;如果元素是隐藏的,切换为可见的

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!