したがって、私のページにトグルのブロックがあり、同じページにトグルの別のブロックを追加する必要がありますが、これはデフォルトで最初のトグルがアクティブ/オープンになっています。私は JS に取り組んできましたが、今のところ運が悪いので、これを機能させるにはあなたの貴重な助けが必要です。ありがとう!
Javascript
jQuery(window).load(function(){
$('.toggle-view li').click(function () {
var text = $(this).children('div.toggle-content');
if (text.is(':hidden')) {
text.slideDown('200');
$(this).children('span').html('<i class="icon-minus"></i>');
} else {
text.slideUp('200');
$(this).children('span').html('<i class="icon-plus"></i>');
}
$(this).toggleClass('activetoggle');
});
});