0

我在 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>

非常感谢谢谢。

4

1 回答 1

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>
于 2013-07-16T14:07:20.843 回答