0

我最近在我的网站上添加了一个 Accordian 以便于查看和管理内容,但是它没有运行,您最初会怀疑,首先它完全忽略了我在 javascript 调用中所做的任何设置,例如,如果我将autoheight更改为true或 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>

非常感谢您花时间尝试解决此问题。

4

1 回答 1

5

你有<div id="accordion">,但你打电话$( "#accordian" )

于 2012-06-05T22:54:27.057 回答