Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery ui accordion close by default

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #153912
    gowda24
    Participant

    html block

    <ul class="accBlk">
            <li><a href="#">accordion heading</a>
              <ul>
                <li class="active" id="">
                    <a href="#">sample1        
                        <span class="print"></span>
                        <span class="delete" ></span>
                        <span class="edit"></span>
                    </a>
                </li>
                <li class="active" s id="">
                    <a href="#">sample2
                      <span class="print"></span>
                      <span class="delete"></span>
                      <span class="edit"></span>
                     </a>
                </li>
                <li class="active"  id="">
                    <a href="#">sample3 
                     <span class="print"></span>
                      <span class="delete"></span>
                      <span class="edit"></span>
                    </a>
                </li>
    
              </ul>
            </li>
        </ul>
    

    jquery code:

    $(".accBlk").accordion({
            accordion:false,
            speed: 500,
            closedSign: '[+]',
            openedSign: '[-]',
            collapsible: true,
            active: false
    
    });
    

    Setting the collapsible to true and active to false , doesnt close the accordion by default.

    Also how to add images to the closedSign: '[+]' and openedSign: '[-]' so that i can replace the strings'[+]’ and ‘[-]’

    #153921
    Paulie_D
    Member
    <li class="active" id="">
    

    If you don’t want them open I don’t think you need the class of active hardcoded.

    http://jqueryui.com/accordion/#collapsible

    As for the icons: http://jqueryui.com/accordion/#custom-icons

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.