Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery UI选项卡未呈现_Jquery_Jquery Ui_Asp.net Mvc 3_Razor - Fatal编程技术网

jQuery UI选项卡未呈现

jQuery UI选项卡未呈现,jquery,jquery-ui,asp.net-mvc-3,razor,Jquery,Jquery Ui,Asp.net Mvc 3,Razor,下面的代码没有javascript或标记错误,但也没有任何选项卡 [[u Layout.cshtml] <html> <head> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascri

下面的代码没有javascript或标记错误,但也没有任何选项卡

[[u Layout.cshtml]

<html>
<head>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/_Layout.js")" type="text/javascript"></script>
</head>
[Index.cshtml]

@{
    ViewBag.Title = "Home Page";
}
<h2>@ViewBag.Message</h2>
@{
ViewBag.Title=“主页”;
}
@查看包。留言
生成的html:

<!DOCTYPE html>

<html>

<head>

    <title>Home Page</title>

    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />

    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="/Scripts/jquery-ui.min.js" type="text/javascript"></script>

    <script src="/Scripts/_Layout.js" type="text/javascript"></script>

</head>



<body>

    <div class="page">

        <div id="header">

            <div id="title">

                <h1>My MVC Application</h1>

            </div>

         <br />

    <div id="tabs">

       <ul>

          <li><a href="#tabs-1">Nunc tincidunt</a></li>

       </ul>

       <div id="tabs-1">

          <p>Tab 1 content</p>

       </div>

    </div>



        <div id="main">



<h2>Welcome to ASP.NET MVC!</h2>

<p>

    To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.

</p>



            <div id="footer">

            </div>

        </div>

    </div>

    </div>

</body>

</html>

主页
我的MVC应用程序

表1内容

欢迎使用ASP.NET MVC! 要了解有关ASP.NET MVC的更多信息,请访问。

为了完整起见,我忘了包括jquery ui css文件:

<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />


谢谢@Paul

尝试将此添加到您的头标签:

<link type="text/css" rel="Stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/redmond/jquery-ui.css" /> 


您能告诉我们生成的实际标记吗?我不熟悉@URL.Content,但您能确认这些脚本正在加载吗?@Trevor:是的,它们显示在chrome开发工具栏的参考资料部分下。没有丢失的资源错误。您是否包括jQuery UI CSS主题???@Trevor-Paul是对的,我应该说选项卡已呈现,但缺少样式。我的错。
<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<link type="text/css" rel="Stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/redmond/jquery-ui.css" />