这里是我的名单,我想扩大/崩溃:我的目标很简单,就是切换展开/折叠,能有这个名单的行为像一个手风琴。 我不明白的是如何从一个隐藏的状态使用下面提供的JavaScript获得<DIV>为可见状态。 任何资源或直接的帮助是极大的赞赏。
运输
<li class="plusimageapply"><a name="faq-question">Why do I see prices for some items and not others? How do I get pricing on items that I want to buy?</a></li>
<div style="display: none;">Ths is a sampel of an answer tot he above question.</div>
<li class="plusimageapply"><a name="faq-question">How do I handle an overnight delivery?</a></li>
<div style="display: none;">AMOeasy offers five overnight shipping options. During checkout, simply check the option that best meets your needs and process your order.
<ul>
<li>UPS orders must be placed before 5:30pm EST / 2:30pm PST.</li>
<li>FedEx orders must be place before 8:00pm EST / 5:00pm PST.</li>
</ul>
If you are concerned that the item may not be in stock, please call customer service at 877-AMO-4LIFE (877-266-4543).
</div>
以下是我使用的JavaScript
<script type="text/javascript">
$(document).ready(function(){
$('li a').click(function () {
var questionname= this.name;
$("#"+questionname).toggle();
$(this).parent().toggleClass("minusimageapply");
});
});
</script>