【发布时间】:2016-01-28 13:31:17
【问题描述】:
我正在尝试制作一个可折叠面板,但是当按下时,什么也没有发生。
这是我正在使用的 CSS 文件:
// Loads all of the CSS styling files needed for view pages to display correctly.
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/jasny-bootstrap.css",
"~/Content/PagedList.css",
"~/Content/bootstrap-datetimepicker.css",
"~/Content/Site.css"));
这里是我使用的所有 JS 文件:
// Loads all of the JavaScript files that are needed for view pages to function
// correctly.
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/moment.js",
"~/Scripts/moment-with-locales.js",
"~/Scripts/jquery-2.1.4.min.js",
"~/Scripts/bootstrap.js",
"~/Scripts/jasny-bootstrap.js",
"~/Scripts/respond.js",
"~/Scripts/bootstrap-datetimepicker.js",
"~/Scripts/jquery-ui-i18n.js"));
然后使用以下方式渲染这些:
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/bootstrap")
现在是可折叠面板所在的实际代码:
@using (Html.BeginForm("Index", "Item", FormMethod.Get, new { @class = "form-inline" }))
{
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapse">Collapsible Group</a>
</h4>
</div>
<div id="collapse" class="panel-collapse collapse">
<div class="panel-body">
Everything goes here...
</div>
</div>
</div>
}
任何帮助将不胜感激。
【问题讨论】:
标签: javascript jquery css asp.net-mvc twitter-bootstrap