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 8322925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:32:52+00:00 2026-06-08T23:32:52+00:00

I have jQuery ui tabs and I would like to be able to open

  • 0

I have jQuery ui tabs and I would like to be able to open a tab from a link (inside or outside the current tab or page)

It does work if the link is in an external page and looks like this:

http://server.com/view.php?id=130#section-2

This correctly open the tab “section-2”

The problem is when the link is in the same page, it does not refresh the page (as it just add the #section-2) so the tab is not selected.

I saw some answers example using ids in the tag and binding the click in jQuery, but I cannot use this because some of my links are computed and I don’t know if they are pointing to inside or outside.

  • 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-08T23:32:55+00:00Added an answer on June 8, 2026 at 11:32 pm

    Add the id “section-2-link” to the tags linked to the tabs (add the ‘-link’ at the end to avoid having same id as the tab content). And then add this to js

    jQuery(window).bind('hashchange', function () { //detect hash change
        var hash = window.location.hash.slice(1); //hash to string (= "section-2")
        jQuery('#' + hash + '-link').trigger("click");
    });
    

    This detects when the hash on url changes and trigger the click on the link you need (to open the correct tab)

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

Sidebar

Related Questions

I have an index page for listing products. From this page I would like
I have a tab system (jQuery) with three tabs inside that are differtent in
jsfiddle: http://jsfiddle.net/DQGMb/ I have JQuery UI Tabs which I would like to stretch all
I have an aspx page on which I have 2 static jquery tabs.Upon clicking
I have a page that is using jQuery tabs. Within one of my tabs
I am using jquery UI tabs I have three ajax tabs like so: <div
I have different php output in jQuery-based tabs. This output is formed from database
I would like to use my existing Jquery UI tabs to shoot my users
jQuery 1.7.1 - I would like to get the index of previously selected tab.
I currently have a tab on my page (created with Jquery UI) that when

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.