jQuery Accordion with MVC [SOLVED]

FishMmk

New Member
I've been looking for this one for a long time now. I have codes like this.Includes in header:\[code\]@Styles.Render("~/Content/css")@Styles.Render("~/Content/themes/base/css")@Scripts.Render("~/bundles/modernizr")@Scripts.Render("~/bundles/jquery")@Scripts.Render("~/bundles/jqueryui")\[/code\]View-file:\[code\]<script> $(function () { $("#accordion").accordion(); });</script><div id="accordion"> <h3><a href="http://stackoverflow.com/questions/15729918/#">UI Testing</a></h3> <div> <p> This is accordion. </p> </div> <h3><a href="http://stackoverflow.com/questions/15729918/#">Panel 2</a></h3> <div> <p> Hello. </p> </div></div>\[/code\]The situation is, that when I open this in my ASP.NET MVC -site, it displays as normal text. Weird thing here is, it works perfectly in jsFiddle. I have no idea why this happens. Any ideas?EDIT:Seems the problem was my fault.Oh my god, I hate myself. I think this might be useful to someone tho.In my _layout-file, I had another jQuery-script include, causing javascript to get mad.Removed it and works perfectly.
 
Back
Top