2 Replies Latest reply: Apr 20, 2012 3:44 PM by Dennis48755 RSS

    How to force page to scroll when collapsible panel is opened by link

    Dennis48755 Community Member

      Hi,

       

      I have seen similiar questions asked but not answered, so maybe there isn't away to do this.

       

      I have numerous collapsible panels going all the way down the page, actually I just formed a Collapsible Panel Group. They are opened by a list of links at the top of the page.

       

      This is an example of a link...

      <li><a href="#CollapsiblePanel14" onclick="cpg.openPanel(13);">AKC CGC & TDI Testing</a></li>

       

      And this is the javascript at the bottom of the page...

      var cpg = new Spry.Widget.CollapsiblePanelGroup("CollapsiblePanelGroup1", { contentIsOpen: false, duration: 800 });

       

      When a link to one of the lower panels is clicked, I would like the page to scroll down so when the panel opens all of the content is within view.

       

      Is there any way to do this?

       

      Thanks

      Dennis