我试图使用jQuery UI的Tabs这个模块,但每当我试图这样做,我得到以下错误在我的控制台:奇jQuery UI的错误
Uncaught TypeError: Object #<an Object> has no method 'tabs'
我跟着演示的源到这封信,而且我仍然无法让它工作。
我正在从本地加载CSS和来自Google CDN的JS,Chrome的开发者工具告诉我浏览器对于每个JS和CSS文件都得到了200 OK
。
任何人都可以对此有所了解吗?
提前致谢!
每请求,我还加入了我的代码:
<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">
您可以添加您用来初始化标签页和标签页HTML的代码吗? – 2010-09-15 21:09:04
你如何加载文件,他们必须按正确的顺序加载,例如'jQuery.js'>'jQuery.UI.js'>'jQuery.UI.Tabs.js' – RobertPitt 2010-09-15 21:10:01
@T B:posted。 @RobertPitt:我已经按顺序加载了它们:'jQuery.js'>'jQuery-UI.js'。我是否需要分别加载标签库?我不需要为jQuery UI的'button()'方法做到这一点...... – esqew 2010-09-15 21:13:15