在此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