2 Replies Latest reply on Jul 22, 2008 10:33 AM by Jdonohoe

    Spry Accordion

    Jdonohoe
      Does anyone have a working example of programically opening and closing accordion panels?

      I have used the samples posted by adobe labs but it wont work for me.

      <body>
      <a href="#" onClick="acc1.openPanel('panel1'); return false;">panel1</a> | <a href="#" onClick="acc1.openPanel('panel2'); return false;">panel2</a> <br />

      <div id="acc1" class="Accordion" tabindex="0">
      <div id="panel1" class="AccordionPanel">
      <div class="AccordionPanelTab">Label 1</div>
      <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div id="panel2" class="AccordionPanel">
      <div class="AccordionPanelTab">Label 2</div>
      <div class="AccordionPanelContent">Content 2</div>
      </div>
      </div>



      <script type="text/javascript">
      var acc1 = new Spry.Widget.Accordion("acc1", { useFixedPanelHeights: false });
      </script>

      </body>

      Thanks!
        • 1. Re: Spry Accordion
          Level 7
          Works here.

          Do you have a URL to a page you are trying to do this on?

          --
          Ken Ford
          Adobe Community Expert - Dreamweaver/ColdFusion
          Fordwebs, LLC
          http://www.fordwebs.com


          "Jdonohoe" <webforumsuser@macromedia.com> wrote in message news:g5oqm1$2kj$1@forums.macromedia.com...
          > Does anyone have a working example of programically opening and closing
          > accordion panels?
          >
          > I have used the samples posted by adobe labs but it wont work for me.
          >
          > <body>
          > <a href="#" onClick="acc1.openPanel('panel1'); return false;">panel1</a> |
          > <a href="#" onClick="acc1.openPanel('panel2'); return false;">panel2</a> <br />
          >
          > <div id="acc1" class="Accordion" tabindex="0">
          > <div id="panel1" class="AccordionPanel">
          > <div class="AccordionPanelTab">Label 1</div>
          > <div class="AccordionPanelContent">Content 1</div>
          > </div>
          > <div id="panel2" class="AccordionPanel">
          > <div class="AccordionPanelTab">Label 2</div>
          > <div class="AccordionPanelContent">Content 2</div>
          > </div>
          > </div>
          >
          >
          >
          > <script type="text/javascript">
          > var acc1 = new Spry.Widget.Accordion("acc1", { useFixedPanelHeights: false });
          > </script>
          >
          > </body>
          >
          > Thanks!
          >
          • 2. Re: Spry Accordion
            Jdonohoe Level 1
            Updating to Spry 1.6 did the job.