asp.net mvc 3 - jQuery UI Accordion: start page without a selected section -
asp.net mvc 3 - jQuery UI Accordion: start page without a selected section -
i have accordion style of navigation section on website @ work , i'm trying figure out if there way set there isn't selected section when page loads...basically see headings none of content.
also not sure it's relevant, site built on mvc3 using c#
code...
<script type="text/javascript"> $(window).load(function () { $('#accordion').accordion({ collapsible: true }); }); </script> <div id="accordion"> <h3> <a href="#">employee stock ownership plan announcement</a></h3> <div> @html.partial("_esop") </div> <h3> <a href="#">tag transport purchase</a></h3> <div> @html.partial("_tagpurchase") </div> <h3> <a href="#">wilcox truck line purchase</a></h3> <div> @html.partial("_wilcoxpurchase") </div> <h3> <a href="#">jri, inc. mentorship</a></h3> <div> @html.partial("_jrimentor") </div> </div>
corrected code based on selected answer...
<script type="text/javascript"> $(window).load(function () { $('#accordion').accordion({ collapsible: true, active: false, fillspace: true, clearstyle: true }); }); </script>
this did 2 things.
made when page loaded there no active content. removed scroll bar panels $(".selector").accordion({ active: false });
jquery asp.net-mvc-3 jquery-ui jquery-accordion
Comments
Post a Comment