6 Replies Latest reply on May 4, 2010 6:35 AM by John Ferguson

    How can I close Accordion panels on mouseout?

    John Ferguson

      What code can I use to get Accordion panels to close on mouseout

      , please?

      Thanks!

        • 2. Re: How can I close Accordion panels on mouseout?
          John Ferguson Level 1

          Yes, I did that first. Thanks anyway, maybe someone else knows.

          • 3. Re: How can I close Accordion panels on mouseout?
            John Waller Adobe Community Professional & MVP

            The best way to get a good response in forums is to provide a link to your website so we can see what code you're dealing with.

            1 person found this helpful
            • 4. Re: How can I close Accordion panels on mouseout?
              Level 4

              maybe someone else knows what... to read minds?

              You don't have any code provided in your post so the best anyone can do is speculate.

               

               

              There were several sloutions on the first page of google.

              What have you tried that didn't work for you?

              • 5. Re: How can I close Accordion panels on mouseout?
                hans-g. Adobe Community Professional & MVP

                Hi John,

                 

                not mouseeout, but it would close your panel:

                 

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

                 

                Hans-G.

                • 6. Re: How can I close Accordion panels on mouseout?
                  John Ferguson Level 1

                  Thanks, John.

                       www.hummert.com

                  Accordion links are on left nav on every page. I have already set default panel to -1 , set reveal to mauseover, and set persistentstate to false, but I still want the panels to close when the cursor moves off them.

                       Here is some of the code I am using:

                   

                     <script type="text/javascript">
                      ddaccordion.init({
                          headerclass: "expandable", //Shared CSS class name of headers group that are expandable
                          contentclass: "categoryitems", //Shared CSS class name of contents group
                          revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
                          mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
                          collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
                          defaultexpanded: [-1], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
                          onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
                          animatedefault: false, //Should contents open by default be animated into view?
                          persiststate: false, //persist state of opened contents within browser session?
                          toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
                          togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
                          animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
                          oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
                              //do nothing
                          },
                          onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
                              //do nothing
                          }
                      })
                      </script>