title: jQuery UI Accordion with MVC3
body: <p>Im having some problems implementing an jQuery UI Accordion widget on my site.</p>
  
  <p>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.</p>
  
  <p>But for some reason its not working.</p>
  
  <p>I have this razor view:</p>
  
  <pre><code>&lt;div id="parameter_accordion"&gt;
  &lt;h3&gt;Parameters&lt;/h3&gt;
  
      @foreach (var item in Model)
      {
          &lt;div&gt;
              &lt;p&gt;@item.Name&lt;/p&gt;
          &lt;/div&gt;    
      }
  </code></pre>
  
  <p></p>
  
  <p>The div tag is "pointing" to the function in my JS file ("ConfigApplication.js"):</p>
  
  <pre><code>$("#parameter_accordion").accordion();
  </code></pre>
  
  <p>Im importing this file along with all the Jquery files in the _Layout.cshtml:</p>
  
  <pre><code>&lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" /&gt;
  
  &lt;script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/ConfigApplication.js")" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>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?</p>