0

我在这个 fidel工作示例中遇到了 TB 和 MVC3 的有线问题,它使用 TB v2.0.2

但在我的 mvc3 项目中,我使用 TB v2.1.1 并且崩溃不起作用......

这是所有脚本参考

<html>
<head>
<meta charset="utf-8" />
<title>MainSearch</title>
<script src="/Scripts/jquery-1.8.1.min.js" type="text/javascript"></script>
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<link href="/Content/datepicker/css/datepicker.css" rel="stylesheet" type="text/css" />
<link href="/Content/DataTables/media/css/DT_bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/Content/boostrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/modernizr-2.6.2.js" type="text/javascript"></script>
<script src="/Scripts/DataTable.js" type="text/javascript"></script>
<script src="/Scripts/jQuery.dataTables.min.js" type="text/javascript"></script>
<script src="/Scripts/DataTable.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap-datepicker.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap-collapse.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.js" type="text/javascript"></script>
<script src="/Scripts/DT_bootstrap.js" type="text/javascript"></script>
 </head>

谢谢

三木

4

1 回答 1

0

我通过更改 JS/CSS顺序解决了它

我想最好的做法应该是 JQUERY 应该比 Main bootstrap Js 先于其他 bootstrap Js 扩展

<script src="@Url.Content("~/Scripts/jquery-1.8.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootstrap.js")" type="text/javascript"></script>
 <script src="@Url.Content("~/Scripts/bootstrap-collapse.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/datepicker/css/datepicker.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/boostrap/css/bootstrap.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/modernizr-2.6.2.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DataTable.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jQuery.dataTables.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DataTable.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootstrap-datepicker.js")" type="text/javascript"></script>
于 2012-10-29T15:05:51.097 回答