Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3224002
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:10:21+00:00 2026-05-17T16:10:21+00:00

I am using the jQuery Tools library Tabs. You can find them here: http://flowplayer.org/tools/tabs/index.html

  • 0

I am using the jQuery Tools library Tabs. You can find them here:
http://flowplayer.org/tools/tabs/index.html

My basic markup is something like this:

$("#tab-holder ul").tabs("div.tab", { history: true, api: true })
$("#profile-sub-tabs ul.menu").tabs("div");

The #profile-sub-tabs is another tab interface within the main #tab-holder interface. The plugin is using a parameter called history which basically allows me to target the tabs using their names, for example:

http://www.blah.com/tabs.aspx#account

Would lead me to the account tab. This works fine, but I want to be able to target sub-tabs specifically. I know this code does not work, but the theory is something like this:

http://www.blah.com/tabs.aspx#account#profile

Leads me to the account->profile tab. Simple enough.

Now I’m not sure if this is possibly to do through the URL, or if I should just somehow handle the requests via Javascript (somehow) and manually use the API to switch to the correct tabs. I’m just not sure how I would go about grabbing that data to switch to the correct tab.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:10:21+00:00Added an answer on May 17, 2026 at 4:10 pm

    There doesn’t seem to be an official solution for this problem. I’ve managed to roll one myself, which will work as long as you can assign a unique ID to each sub-tab.

    The idea is basically that you don’t actually need to tell the page which top tab to open, because it can be inferred from looking for the sub-tab that is being requested. So in your link, you would only need to reference the sub-tab, like so:

    http://www.blah.com/tabs.aspx#profile
    

    Before I get started, here’s a live demo showing this in action: http://jsfiddle.net/CrAU7/

    Let’s say you have an html structure like so:

    <div class="wrap">
        <!-- the tabs -->
        <ul class="tabs">
            <li><a href="#big1">Tab 1</a></li>
            <li><a href="#big2">Tab 2</a></li>
            <li><a href="#big3">Tab 3</a></li>
        </ul>
        <!-- tab "panes" -->
        <div class="pane" id="big1">
            <p>#1</p>
            <!-- the tabs -->
            <ul class="tabs">
                <li><a href="#big1small1">Tab 1</a></li>
                <li><a href="#big1small2">Tab 2</a></li>
                <li><a href="#big1small3">Tab 3</a></li>
            </ul>
            <!-- tab "panes" -->
            <div class="pane" id="big1small1">Tab 1 - First tab content.</div>
            <div class="pane" id="big1small2">Tab 1 - Second tab content</div>
            <div class="pane" id="big1small3">Tab 1 - Third tab content</div>
        </div>
        <div class="pane" id="big2">
            <p>#2</p>
            <!-- the tabs -->
            <ul class="tabs">
                <li><a href="#big2small1">Tab 1</a></li>
                <li><a href="#big2small2">Tab 2</a></li>
                <li><a href="#big2small3">Tab 3</a></li>
            </ul>
            <!-- tab "panes" -->
            <div class="pane" id="big2small1">Tab 2 - First tab content.</div>
            <div class="pane" id="big2small2">Tab 2 - Second tab content</div>
            <div class="pane" id="big2small3">Tab 2 - Third tab content</div>
        </div>
        <div class="pane" id="big3">
            <p>#3    </p>
            <!-- the tabs -->
            <ul class="tabs">
                <li><a href="#big3small1">Tab 1</a></li>
                <li><a href="#big3small2">Tab 2</a></li>
                <li><a href="#big3small3">Tab 3</a></li>
            </ul>
            <!-- tab "panes" -->
            <div class="pane" id="big3small1">Tab 3 - First tab content.</div>
            <div class="pane" id="big3small2">Tab 3 - Second tab content</div>
            <div class="pane" id="big3small3">Tab 3 - Third tab content</div>
        </div>
    </div>
    

    The important thing to note is that I’ve given tab pane a unique ID, and the tab’s href is the same ID, prefixed with a hash. Then you’ll need a function like this:

    function TabByHash(hash) {
        var $myTab = $(hash);
        if ($myTab.size() != 0) {
            //alert('hi!');
            var $topTab = $myTab.parent().closest('.pane');
            if ($topTab.size() != 0) {
                $('a[href=#' + $topTab.attr('id') + ']').click();
            }
            $('a[href=#' + $myTab.attr('id') + ']').click();
        }
    }
    

    On page load, you’ll want to call the function with the hash part of the url: TabByHash(window.location.hash); This then looks for a tab pane with the corresponding ID. If the pane is located within a parent pane, it first activates that parent pane, then activates the requested pane. Otherwise it simply activates the requested pane. Hopefully this will do the trick for you.

    NOTE: Due to restrictions on the jsFiddle demo, I bound the TabByHash function to anchor clicks, but in your situation, you will want to just call it on page load.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the jQuery Tools Tooltip (http://flowplayer.org/tools/tooltip/index.html), and I'm trying to get the
I am using Jquery image annotate library (http://code.google.com/p/jquery-image-annotate/) to apply tags to an image.
I'm using the jQuery tools tabs to divide my page into tabs. One of
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, what's the best way to find the next form element on the
Using jQuery, how would you find elements which have a particular style (eg: float:
I am using JQuery Tools Scrollable to build a full-page-width scrollable form, such that
I am using Jquery tools, overlay effect and want to close it, if JSON
I'm using jQuery 1.4.2, and jQuery Tools 1.2.5 to animate an accordion in my
Using jQuery, how do you bind a click event to a table cell (below,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.