在此html上添加切换事件,这里是的html代码。我需要更多的行切换事件。但其唯一的作品为第一个,当我添加更多,但它不适用于第二和第三个。我需要jQuery切换事件的解决方案。
<div class="faq_description">
<div class="faqs_text">
<h3 id="click_question">simply dummy text of the printing and typesetting ?</h3>
<p id="toggle_text">the industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leapthe industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap</p>
</div>
<div class="faqs_text">
<h3 id="click_question">simply dummy text of the printing and typesetting ?</h3>
<p id="toggle_text">the industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leapthe industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap</p>
</div>
</div>
JavaScript代码这个HTML:
$(document).ready(function(){
$("#click_question").click(function(){
$("#toggle_text").toggle(1000);
});
});
真的你把代码贴出来了吗? – William
使用class而不是id,在这里粘贴你的代码 –
可能有问题,因为你使用id而不是class – DestinatioN