html - jQueryUI accordion expanded on load -
i have accordion created , when load page shows content second. when finish loading page, accordion collapse intended.
<script> $(function() { $( "#accordion_rel" ).accordion({ collapsible: true, active: false }); }); </script> <div id="accordion_rel"> <h3> related articles </h3> <div> <ul class="side-expand"> {% cur in topic.articles %} <li> <a class="{% if article.id == cur.id %}active{% else %}inactive{% endif %}" href='{{ cur.public_url }}'> {{ cur.subject_plain | clip:35 }} </a> </li> {% endfor %} </ul> </div> </div>
adding inline style in first div did trick!
<div id="accordion_rel"> <h3> related articles </h3> <div style="display:none"> html css jquery-ui
No comments:
Post a Comment