我对他们有一些HTML这样jQuery的隐藏()和show()不工作 - 极度Frustated
<div id="topContainer">
<div id="level1" style="display:none;"> </div>
<div id="level2" style="display:none;"></div>
</div>
我可以检索Level1和Level2,调用显示()和隐藏()成功。但是,有style =“display:none;”然后调用jQuery(“#topContainer”)。show()做nada。 :(
怎么可能是错的?
JS下面
//LOGIC HERE THAT SHOWS LEVEL1 and LEVEL2 based on business logic
//If neither div is shown (got a variable set to false, it set to true each time
//the business logic shows the div
//if variable is still false, then the below line runs
jQuery("#topContainer").hide()
尽可能多的代码更新,我可以。对父母
定义** **虚无缥缈。另外,哪些元素具有'style =“display:none;”?这是在你的CSS?请澄清你的问题。 – RPM1984 2010-11-02 23:55:51
我没有收到任何错误。我只看到顶层div仍然显示。我叫了皮,它仍然存在。 :( – bobber205 2010-11-03 00:03:07
风格=“显示:无”是在HTML标记 – bobber205 2010-11-03 00:03:46