0

I am trying to give my tabs a direct external link, so that the page can load on a specific tab.

I find loads of examples of doing this but all use a '#tab' as the index that is added to the URL.

Can anyone tell me of a way to link directly to a tab without using a '#'?

madth3
  • 7,001
  • 11
  • 45
  • 69
Richard Harris
  • 291
  • 1
  • 3
  • 11
  • 1
    Why don't anchors work? Do you not want to give each tab an ID? – Trojan Jul 19 '13 at 23:43
  • I am using # for something else, so the tabs have to add an index to the url with a prefix that isn't a '#', but I can't find many examples that use other things, such as using '&' or something – Richard Harris Jul 20 '13 at 12:04
  • I don't think there is a built-in way other than anchors (#). What are you already using the IDs for that keeps you from using them as anchors? There's nothing that keeps you from using them for both – Trojan Jul 21 '13 at 00:47
  • Something else you *could* do (but is more work, and possibly unnecessary) is utilize a URL parameter. For example, go to your SO profile, then look at the URL after clicking on each tab at the bottom (summary, response, reputation, etc.). This would be pretty easy to do, then scroll to the intended spot on the page (see [this answer](http://stackoverflow.com/a/6677069/2231440)). – Trojan Jul 21 '13 at 02:13
  • Thanks for your replies. I have sliders within my tabs. Each slide uses '#' as a bookmark for that slide. I need to be able to link to a specific tab and a specific slide within that tab. So far, if using '#' for both the tab and the slides, it just replaces the existing '#' with a new one so I can't combine the tab and slider bookmarks. – Richard Harris Jul 21 '13 at 11:16

0 Answers0