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

  • SEARCH
  • Home
  • 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 9259235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:36:23+00:00 2026-06-18T12:36:23+00:00

How to select a tab by id in recent versions of jQuery UI? I

  • 0

How to select a tab by id in recent versions of jQuery UI? I used to do this:

$(mytabs).tabs("select", "#tab_contents");

And it worked fine, even with some of the tabs hidden. Now I upgraded jQuery UI and the code above does not work anymore. I tried following some other suggestions on this site, and ended up with this:

$(mytabs).tabs("option", "active", $(mytabs).find("li").index("#tab_header"));

Not only it’s way more verbose, but it doesn’t select the correct tab, since some of them are hidden. How can it be done?

P.S. To hide some tabs, I used $("#tab_header").hide(). Is this still correct in recent versions, or is there a better way?

  • 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-06-18T12:36:24+00:00Added an answer on June 18, 2026 at 12:36 pm

    Found out a solution:

    $(mytabs).tabs("option", "active", $("#tab_header").index());
    

    This selects the correct tab, regardless of which ones are visible (it’s even possible to select tabs currently invisible – the contents are shown, but the header is not).

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

Sidebar

Related Questions

I have JQuery tabs in my view. Each tab contain a partial view. Some
I'm using jQuery UI tabs for simple tab navigation on a page, and this
Is there a way to select the jQuery active tab with a HTML propertys.
I understand how to add a jquery-ui tab, and I understand how to select
According to the MySQL Certification Guide, when --tab option is used, a SELECT ...
I am testing the existence of dynamic tabs in jQuery. If it exists, select
I want to delete the tabs without selecting it. When I select a tab
I'm having some trouble selecting a tab programmatically. My tabs are loading inside a
I have few tabs like Photo,Story,Graphics inside XamDockManager.I need to select a tab on
i have two tabs tabfirst, tabsecond. whenever i select a tab(first or second) i

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.