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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:08:43+00:00 2026-05-28T01:08:43+00:00

Using Jquery UI tabs, I am trying to different divs show/hide when a particular

  • 0

Using Jquery UI tabs, I am trying to different divs show/hide when a particular tab is selected. The divs will be on the sidebar while the tab action is located in the page’s main content div.

Here is my code:

            <div id="tabs">
            <ul>
            <li><a href="#tabs-1">tab 1</a></li>
            <li><a href="#tabs-2">tab 2</a></li>
            </ul>

            <div id="tabs-1">
            Tab 1 Content
            </div>

            <div id="tabs-2">
            Tab 2 Content
            </div>

            </div>


            <div id="sidebar">

            <div id="tabs1show">This is "#sidebar tabs1show ... 1</div>
            <div id="tabs2show">This is "#sidebar tabs2show"... 2</div>
            </div>

When #tabs-1 is selected, I would like #tabs1show content to appear in the sidebar. When #tabs-2 is selected, #tabs1show div is hidden and #tabs2show content appears in the sidebar. I know I have to put some kind of combination of show/hide (perhaps) in the ” $tabs = $(‘#tabs’).tabs(); ” to link the action, but I don’t know the exact way to do so. I am relatively new to jquery so, please, any help would be greatly appreciated.

Thank you.

  • 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-28T01:08:44+00:00Added an answer on May 28, 2026 at 1:08 am

    You can hook into the ‘select’ event, when someone picks a tab:

    $('#tabs').tabs({
       select: function(event, ui) {
           $('.secret').hide().eq(ui.index).show(); 
       }
    });
    

    ‘secret’ is the class I’ve added to your html, do whatever you’d like to target those sidebar panels.

    jsFiddle

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

Sidebar

Related Questions

While trying to implement some jQuery UI Tabs using AJAX I keep running into
I'm using jQuery tabs, and trying to save the positions of the Tabs (and
I am using jQuery UI tabs to have a tab where I can search
I'm trying to create a tab set using jQuery UI that has some permanent
I am trying to position links to jQuery Tabs under the tab content, with
I'm using jQuery and trying to initialize the tabs jQuery UI widget. The problem
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 am using jQuery UI Tabs . <div id=tabs> <ul id=tablist> <li><a href=#fragment-1><span>One</span></a></li> </ul>
I'm using the jquery tabs plugin and want to have the background a light

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.