codeigniter - jquery-ui menu collapse first category onload -


i'm trying use jquery-ui menu pretty face issues like:

  1. first category opened onload.
  2. when category chosen , page refresh current category closed , first category opened.

i'm using default configuration.

my code pretty simple:

 <script>   $(function() {     $( "#accordion" ).accordion();   });   </script>      <div id="accordion">           <h3>teste categ1</h3>           <div>                  <a href="<?php echo base_url().'categorie/1/1';?>">tip1</a>                 <a href="">teste c1 subc1</a>                 <a href="">teste c1 subc2</a>                 <a href="">teste c1 subc3</a>            </div>          <h3>teste categ2</h3>             <div>                      <a href="<?php echo base_url().'categorie/2/1';?>">tip1</a>                     <a href="">teste c2 subc1</a>                     <a href="">teste c2 subc2</a>                     <a href="">teste c2 subc3</a>              </div>     </div> 

if somehow possible open second category onload chosen great. thanks!

by default jquery accordion makes first tab active.if want different tab active need tell it.suppose if want make 2nd tab active need write way

$( "#accordion" ).accordion({     active: 2       }); 

you can see more details here


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -