最近、コンテンツの表示と管理を容易にするためにサイトにアコーディオンを追加しましたが、動作していないため、最初は疑問に思うでしょう。まず、autoheightをtrueに変更した場合など、javascript 呼び出しで行った設定を完全に無視しています。または false、目に見える変更はまったく行われません。
<div id="accordion">
<h3><a href="#">Accordion Header #1</a></h3>
<div>
Lots of content here which would belong to the accordion menu selected, this would be much larger than the other two contents.
</div>
<h3><a href="#">Accordion Header #2</a></h3>
<div>
Not as much as #1, therefore the height is reduced to support that without leaving a huge gap
</div>
<h3><a href="#">Accordion Header #3</a></h3>
<div>
Only about a line of writing, don;t want the huge gap
</div>
</div>
悲しいことに、私がアコーディオンを何をしてもまったく反応しません。小さなコンテンツに大きなギャップを作りたくありません。非常に見苦しいので、これらを削除できることは理解しています。ただし、前述のとおり、私のスクリプトは応答しません。
ドキュメントのヘッダーにこれがあります:
<script>
$(document).ready(function() {
$( "#accordian" ).accordion({ clearStyle: true, autoHeight: false });
});
</script>
この問題を解決するためにお時間をいただき、誠にありがとうございます。