0
我是MVC的新手,並計劃使用手風琴。當我嘗試添加jQuery手風琴的所有引用並創建div時,手風琴不存在/出現。MVC中的jQuery Accordion
這是我的代碼。
@{
ViewBag.Title = "Online Coach Tracker | Workforce Reporting and Business Intelligence";
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" href="../../development-bundle/themes/base/jquery.ui.all.css">
<script src="../../js/jquery-1.10.2.js"></script>
<script src="../../development-bundle/ui/jquery.ui.core.js"></script>
<script src="../../development-bundle/ui/jquery.ui.widget.js"></script>
<script src="../../development-bundle/ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../../development-bundle/demos/demos.css">
<script>
$(function() {
$("#accordion").accordion({
collapsible: true
});
});
</script>
</head>
<body>
<div id="accordion">
<h1><a href="#1">Section 1</a></h1>
<div>In section 1</div>
<h1><a href="#2">Section 2</a></h1>
<div>In section 2</div>
</div>
</body>
</html>
在此先感謝!
感謝您的答覆。 最後,佈局頁面出現錯誤。有一個現有的CSS/JS參考。 – user3560764