jQuery UI 不工作? (特别是标签)
奇怪的问题。我看过一些类似的问题 - 他们的答案都没有解决我的问题。
它做的所有事情都是正确的,但选项卡并没有像预期的那样变得具有交互性,它们只是全部显示出来。
我尽可能多地省略了不必要的代码,包括我的装饰性 CSS。
请随时向我询问更多信息。感谢您的观看。
这是我的头文件:
<link rel="stylesheet" type="text/css" href="/Include/styleSheetV2.css"/>
<link rel="stylesheet" type="text/css" href="/Include/StyleSheet.CSS"/>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet"/>
<script type="text/javascript" src="https://www.google.com/jsapi?key=(Removed key for StackOverflow)"></script>
<script type="text/javascript" src="/JSFunctions.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");
google.load("jqueryui", "1.8.16");
</script>
这是 HTML 代码
<div id="prof_div" class="sG_tabber">
<ul class="sG_tabberNav">
<li><a href="#prof_home">Profile Home</a></li>
<li><a href="#prof_details">Details</a></li>
<li><a href="#prof_settings">Settings</a></li>
</ul>
<div id="prof_home" class="sG_tabberTab">
1
</div>
<div id="prof_details" class="sG_tabberTab">
2
</div>
<div id="prof_settings" class="sG_tabberTab">
3
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#prof_div > ul').tabs({
fx: { height: 'toggle', opacity: 'toggle' }
});
});
</script>
这是我的 CSS 代码(只有必要的部分)
.ui-tabs-hide {
display: none;
}
Odd problem. I've looked at some similar questions- None of their answers fixed my problem.
It's doing all the stuff right but rather than the tabs becoming interactive like they're meant to, they just all show.
I'm leaving out as much unnecessary code as possible, including my decorative CSS.
Feel free to ask me for additional information. Thanks for viewing.
Here's my header file:
<link rel="stylesheet" type="text/css" href="/Include/styleSheetV2.css"/>
<link rel="stylesheet" type="text/css" href="/Include/StyleSheet.CSS"/>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet"/>
<script type="text/javascript" src="https://www.google.com/jsapi?key=(Removed key for StackOverflow)"></script>
<script type="text/javascript" src="/JSFunctions.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");
google.load("jqueryui", "1.8.16");
</script>
This is the HTML code
<div id="prof_div" class="sG_tabber">
<ul class="sG_tabberNav">
<li><a href="#prof_home">Profile Home</a></li>
<li><a href="#prof_details">Details</a></li>
<li><a href="#prof_settings">Settings</a></li>
</ul>
<div id="prof_home" class="sG_tabberTab">
1
</div>
<div id="prof_details" class="sG_tabberTab">
2
</div>
<div id="prof_settings" class="sG_tabberTab">
3
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#prof_div > ul').tabs({
fx: { height: 'toggle', opacity: 'toggle' }
});
});
</script>
And here's my CSS code (Only the necessary bit)
.ui-tabs-hide {
display: none;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
$("#prof_div").tabs()
而不是#prof_div > ul
Try using
$("#prof_div").tabs()
not#prof_div > ul