我试图让锚标记的数据内容部分中的任何内容显示为弹出菜单。我之前测试它时让它工作,但现在我无法显示数据,我唯一做的就是将更多项目添加到作为模型出现的列表中。任何人都知道为什么我的弹出窗口不起作用?
@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>