Im having some problems implementing an jQuery UI Accordion widget on my site.
I list with a heading, that i wan't to be able to colapse/expand. For this im trying to use the jQuery UI Accordion widget.
But for some reason its not working.
I have this razor view:
<div id="parameter_accordion">
<h3>Parameters</h3>
@foreach (var item in Model)
{
<div>
<p>@item.Name</p>
</div>
}
The div tag is "pointing" to the function in my JS file ("ConfigApplication.js"):
$("#parameter_accordion").accordion();
Im importing this file along with all the Jquery files in the _Layout.cshtml:
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/ConfigApplication.js")" type="text/javascript"></script>
but for some reason the view is not showing as a accordion. Its shoving all content, all the time. Can anyone see what i'm doing wrong?