2009-07-05 13 views
1

私はここで何が間違っていますか?私はjQueryのUIタブを使い始めようとしています。 今は動作していません。 私は、キャッシュされるように私はGoogleのバージョンを使用すると思った。 私はどこにGoogleがui.tabs.jsを持っているかを見たいと思います。jQuery ui tabs

<html> 
<head> 
<link rel="stylesheet" type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css"> 
<script src="http://www.google.com/jsapi"></script> 
<script type="text/javascript"> 
google.load("jquery", "1"); 
google.load("jqueryui", "1"); 
google.setOnLoadCallback(function() { 
    $("#myTabs").tabs(); 
}); 
</script> 
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.tabs.js"></script> 
</head> 

<body> 
<ul id="myTabs"> 
    <li><a href="#0"><span>Tab 1</span></a></li> 
    <li><a href="#1"><span>Tab 2</span></a></li> 
</ul> 
<div id="0">This is the content panel linked to the first tab, it is shown by default.</div> 
<div id="1">This content is linked to the second tab and will be shown when its tab is clicked.</div> 
</body> 
</html> 

答えて

2

あなたは同じcontinerにすべてのタブを囲む必要があります。それだった

<div id="myTabs"> 
<ul> 
    <li><a href="#0"><span>Tab 1</span></a></li> 
    <li><a href="#1"><span>Tab 2</span></a></li> 
</ul> 
<div id="0">This is the content panel linked to the first tab, it is shown by default.</div> 
<div id="1">This content is linked to the second tab and will be shown when its tab is clicked.</div> 
</div> 
+0

ああ!これはjQuery UI 1.6の本の例#1だったので、いい記号ではありません! –