1
我試圖獲取錨點標記的數據內容部分中的任何內容以顯示爲彈出菜單。當我測試它之前,我已經開始工作了,但現在我無法獲取要顯示的數據,我所做的唯一事情是將更多項目添加到作爲模型出現的列表中。 任何人都知道爲什麼我的popover不工作?Twitter bootstrap rel =「彈出窗口」,數據內容不顯示彈出窗口
@helper CreateSubMenu(MenuItem[] menuItems)
{
foreach (var Item in menuItems)
{
<li><a href="#" id="@Item.HtmlId" rel="popover" data-content="@Item.Description">@Item.Name</a>
@if (Item.MenuItems.Any())
{
@WrapWithUl(Item.MenuItems)
}
</li>
}
}
@helper WrapWithUl(MenuItem[] menuItems)
{ <ul>
@CreateSubMenu(menuItems)
</ul> }
<div class="pull-left demo-dd demo-container span3">
<strong>
<ul id="drilldown-3">
@CreateSubMenu(Model.MenuItems)
</ul>
</strong>
</div>
<script type="text/javascript">
$(document).ready(function($){
$('#drilldown-3').dcDrilldown({
speed : 'fast',
saveState : false,
showCount : false,
linkType : 'breadcrumb'
});
});
</script>
這裏是我在_layout.cshtml文件導入
<head>
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/css/bootstrap/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/site.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/base-admin.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/base-admin-responsive.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/fontAwesome/font-awesome.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/dcdrilldown.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/css/skins/demo.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/DataTables-1.9.4/media/css/demo_table.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery-migrate-1.1.1.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.cookie.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.dcdrilldown.1.2.js")"></script>
<script src="@Url.Content("~/Scripts/bootstrap.js")"></script>
<script src="@Url.Content("~/Scripts/excanvas.min.js")"></script>
<script src="@Url.Content("~/Scripts/DataTables-1.9.4/media/js/jquery.dataTables.min.js")"></script>
</head>