JQuery UI Accordion不是一个功能

时间:2013-07-16 13:28:30

标签: jquery jquery-ui accordion

我在Opera Dragonfly中得到一个错误,说“手风琴不是一个功能”或类似的东西。有人可以看一下这段代码并告诉我我做错了什么吗?

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <script src="Scripts/jquery-1.10.2.js"></script>
    <script src="Accordion/jquery.ui.core.js"></script>
    <script src="Accordion/jquery.ui.widget.js"></script>
    <script src="Accordion/jquery.ui.accordion.js"></script>
    <link href="Accordion/jquery-ui.css" rel="stylesheet" />
    <link href="Accordion/jquery.ui.accordion.css" rel="stylesheet" />

    <script>
        $(function () {
            $('#accordion').accordion();
        });
    </script>    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">  
<div id="accordion">
    <h6>Section 1</h6>
    <div>
        <p>
        TEST 1
        </p>
    </div>
    <h6>Section 2</h6>
    <div >
        <p>
        TEST 2
        </p>
    </div>
    <h6>Section 3</h6>
    <div >
        <p>
        TEST 3
        </p>
    </div>
</div>
</asp:Content>

非常感谢谢谢。

1 个答案:

答案 0 :(得分:0)

您是否有可能在脚本文件路径上出错?

注意区别:

<!-- Starting with Scripts -->
<script src="Scripts/jquery-1.10.2.js"></script>

<!-- Starting with Accordion -->
<script src="Accordion/jquery.ui.core.js"></script>
<script src="Accordion/jquery.ui.widget.js"></script>
<script src="Accordion/jquery.ui.accordion.js"></script>