Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我<div id="hideclass">在 jquery 选项卡中有一些。我希望它可以隐藏或不出现。我希望它可以在我单击某个按钮后出现。我怎么做?
<div id="hideclass">
使用这个 CSS:
#hideclass{ display:none; }
和 jQuery:
$('#button').click(function(){ $('#hideclass').show(); });
或者您可能想要滑动切换它:
$('#button').click(function(){ $('#hideclass').slideToggle(); });
#button单击时将显示 div 的按钮的 id 在哪里,例如:
#button
<button id="button">