Skip navigation
Currently Being Moderated

Need ideas for Accordion which will open to a specific panel from a remote link

Jun 22, 2012 6:56 PM

I found this with this which works OK EXCEPT for the "close" text link.

Can that link be repaired?

 

http://www.binney.us/accordion%20remote2.htm#2

 

Other ideas are most welcome.

 

Many thanks

 
Replies
  • Currently Being Moderated
    Jun 22, 2012 9:56 PM   in reply to Ken Binney

    Not sure what you mean, the heading seems to contradict the contents.

     

    If you just want to close the panel with the "close" text link, then try the following

    <!DOCTYPE html>

    <html>

      <head>

        <title>No Title</title>

        <meta charset="utf-8">

        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

        <script>

        $(function() {

          $("#accordion").accordion({

            active: false,

            collapsible: true,

            autoHeight: false,

            navigation: true,

            header: '.menuitem'

          });

          $(".closelink").click(function(){

            $("#accordion").accordion({

              active: false,

            });

          });

        });

        </script>

      </head>

     

      <body>

        <div id="accordion">

        <a class="menuitem" href="#1">FIRST POSITION TITLE</a>

        <!-- accordion panel --><div>

     

        FIRST POSITION DESCRIPTION

        <a href="#" class="closelink">Close</a>

         <!-- CLOSE PANEL -->

        <!-- end accordion panel -->

        </div>

     

        <P></P>

        <a class="menuitem" href="#2">SECOND POSITION TITLE</a>

        <!-- accordion panel --><div>

     

        SECOND POSITION DESCRIPTION

        <a href="#" class="closelink">Close</a>

        <!-- CLOSE PANEL -->

        <!-- end accordion panel -->

        </div>

        <!-- end accordion -->

     

      </body>

    </html>

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points