简体   繁体   English

jQuery UI不起作用? (特别是标签)

[英]jQuery UI not working? (Specifically tabs)

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. 我遗漏了尽可能多的不必要的代码,包括装饰性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 这是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>

And here's my CSS code (Only the necessary bit) 这是我的CSS代码(仅必要的部分)

.ui-tabs-hide {  
    display: none;
}

尝试使用$("#prof_div").tabs()而不是#prof_div > ul

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM