代码之家  ›  专栏  ›  技术社区  ›  esqew

奇jquery用户界面错误

  •  1
  • esqew  · 技术社区  · 14 年前

    我正在尝试使用jquery ui-tabs模块,但每当我尝试这样做时,在控制台中都会出现以下错误:

    Uncaught TypeError: Object #<an Object> has no method 'tabs'
    

    我一直跟踪演示的来源直到信,但我仍然无法让它工作。

    我在本地加载CSS和来自Google CDN的JS,而Chrome的开发工具告诉我浏览器 200 OK 对于每个JS和CSS文件。

    有人能解释一下吗?

    事先谢谢!


    根据请求,我还添加了我的代码:

    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">TrafficLight!</a></li>
            <li><a href="#tabs-2">countr</a></li>
            <li><a href="#tabs-3">Future projects</a></li>
        </ul>
        <div id="tabs-1">
            <p><b>TrafficLight!</b> is an application that will temporarily turn your iPhone's screen red, yellow, or green. It's useful for providing instant, easy-to-understand feedback to anyone, especially a public speaker.</p>
            <p><b><a href="#">Download on the App Store</a></b></p>
        </div>
        <div id="tabs-2">
            <p><b>countr</b> is a basic counting application. You can use it to count baseball pitches, money, hats, anything!</p>
            <p><b><a href="#">Download on the App Store</a></b></p>
        </div>
        <div id="tabs-3">
            <p><i>Coming soon... ;)</i></p> 
        </div>
    </div>
    

    哎呀,忘了这部分代码:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
    <script type="text/javasctipt" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $("#tabs").tabs();
    });
    </script>
    <link rel="stylesheet" href="jquery-ui-1.8.4.custom/css/ui-darkness/jquery-ui-1.8.4.custom.css">
    
    1 回复  |  直到 14 年前
        1
  •  9
  •   Tim Banks    14 年前