我在互聯網上找到了一個非常好的可摺疊內容示例,但尚未完成。鼠標點擊摺疊行
<div class="container faq_wrapper">
<div class="row">
<div class="span10 offset1">
<p>
</p>
<div class="faq-all-actions">
<a class="faq-expand" onclick="jQuery('.answer-wrapper').css('display','block');">Expand All</a> | <a class="faq-collapse" onclick="jQuery('.answer-wrapper').css('display','none');">Collapse All</a></div>
</div>
</div>
<div class="row">
<div class="span10 offset1">
<div class="question-wrapper">
<div class="arrow">
</div>
<div class="big-q">
Q</div>
<div class="question">
<h6>Can I try the software before I buy it?</div></h6>
<div class="answer-wrapper">
<div class="big-a">
A</div>
<div class="answer">
Yes! Simply <a href="/trial">download a free trial</a> and you'll have instant access to all features for 30 days, absolutely free. We don't require your credit card details or any commitment.</div>
</div>
</div>
</div>
</div>
</div>
當我點擊行時,該如何展開或隱藏答案?
你能舉個例子嗎? –
代碼無法正常工作。當我展開它時,它會再次自動隱藏。 –
請參閱jsfiddle。 http://jsfiddle.net/7bz5au97/它按預期工作。 – zgr024