collapse - Collapsible bootstrap, show first element -
i want show first element of collapsible accordion. did research in net in vain
class="snippet-code-html lang-html prettyprint-override"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5udgw3ahqw6xtjmnntr+obrjulgknjeo78p4b0yrw= sha512-nno+ycheyn0smmxsswnf/onx6/kwjuztlnzbjaukhtk0c+zt+q5jocx0ufhxq6rjr9jg6es8gpud2uzcydlqsw==" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-kxn5pumvxcw+dayznun+drmdg1ifl3agk0p/pqt9kao= sha512-2e8qq0etcfwri4hjbzqia3uoyfk6tbnyg+qsaibzlyw9xf3swzhn/lxe9fth1u45dppf07yj94ksuhhwe4yk1a==" crossorigin="anonymous"></script> <div class="accordion" id="accordion2"> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseone" > aller au dossier personnel d'un agent </a> </div> <div id="collapseone" class="accordion-body collapse" style="height: 0px; "> <div class="accordion-inner"> <form action="gotoagent.do" method="post"> <p align="center"> <input type="hidden" value="identite" name="retour"> <label for="nomprenom" > entrer le nom complet de l'agent: </label> <input type="text" name="nomprenom" class="typeahead" /> <br> <input type="submit" value="appliquer" class="btn btn-info" /> </form> </div> </div> </div> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapsetwo"> ajout d'un nouveau fonctionnaire </a> </div> <div id="collapsetwo" class="accordion-body collapse"> <div class="accordion-inner"> <!-- lorem --> </div> </div> </div> </div>
i don't think you've got html need accordion work unless haven't pasted above.
the bootstrap docs first illustration has first element set open:
http://twitter.github.com/bootstrap/javascript.html#collapse
i think it's class "in" sets open initially.
<div class="accordion" id="accordion2"> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseone"> collapsible grouping item #1 </a> </div> <div id="collapseone" class="accordion-body collapse in"> <div class="accordion-inner"> anim pariatur cliche... </div> </div> </div> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapsetwo"> collapsible grouping item #2 </a> </div> <div id="collapsetwo" class="accordion-body collapse"> <div class="accordion-inner"> anim pariatur cliche... </div> </div> </div> </div>
twitter-bootstrap collapse bootstrap-accordion
No comments:
Post a Comment