Skip navigation
Currently Being Moderated

link named anchor to specific tab on widget

Dec 1, 2009 6:35 AM

I have a page -  I want it to link to the named anchors within a tabbed Spry widget - see page


I put a named anchor inside each tabbed panel, I also tried to put the anchor on each tab.  Neither one works. It appears that the anchor sees the widget as one object, therefore I am taken to the correct page, but always to the same tab (ie the one that is set as default).  I was wondering if there is a way to have it link directly to the tab that I want open.




  • Currently Being Moderated
    Dec 2, 2009 4:45 AM   in reply to lisaellensegal



    You want something along the following lines.


    In the link from the external page have a querystring in the link


    i.e. mytabbedpanelpage.html?panel=2


    Then have a bit of script in the tabbed panel page.


    var params= Spry.URLutils.geturlparamsasobject();


    if (params.panel)





    Check out the Spry documentation for exact syntax as at work at present and not in front of documentation.





    Mark as:
  • Currently Being Moderated
    Dec 2, 2009 5:28 AM   in reply to lisaellensegal
    Mark as:
  • Currently Being Moderated
    May 24, 2011 11:32 AM   in reply to lisaellensegal

    The instructions above SEEM like just what I need - but when I update the script at the bottom of the code to


    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: ? : 0});


    The content from all of my panels moves to one panel, and the widget no longer works.

    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