我有这个代码的slideToggle多个div
jQuery(function ($) {
//After it toggle the content with this button
$('.content_toggle').hide();
$(".link-toggle").click(function() {
$(this).nextAll(".content_toggle").slideToggle("slow");
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<div class="link-toggle">Read more</div>
<div class="content_toggle">
Hello world
</div>
<div class="link-toggle">Read more again ?</div>
<div class="content_toggle">
Another Hello world
</div>
我想通过一个切换这些内容之一, 就像当我点击第一个div,其内容如下切换。 然后如果点击第二个div,它的下面的内容切换。
不是两个在同一时间。