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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:20:38+00:00 2026-06-12T03:20:38+00:00

I have a simple JQuery UI tabs menu working, and I set it up

  • 0

I have a simple JQuery UI tabs menu working, and I set it up so that all the links except the first (Home) will expand/collapse, and clicking the “Home” item will just redirect to the same page.

    $("#tabs").tabs({
    collapsible: true,
    select: function(event, ui) {
        if (ui.index == 0){//home
            window.location.href = 'test.html';
        }
    }
});

Though this works, when The “Home” tab is active, and you click on any other tab for the first time, both tabs get the active class applied for some reason. This only happens the first time. Selecting the same tab or other tabs again does not cause that problem. I’m not sure how to troubleshoot this.

You can see the demo here

  • 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-12T03:20:39+00:00Added an answer on June 12, 2026 at 3:20 am

    2 problems:

    1. your href of “#” is causing errors
    2. not having a reference for home seems to also cause errors.

    http://jsfiddle.net/D7kqG/3/ seems to have the functionality you want– you’d just have to style the “home” div to have no height/width to look the way you want.

    EDIT: would have expected this to work:

    http://jsfiddle.net/D7kqG/4/

    (i.e. collapse the home tab whenever it’s clicked) But it isn’t adding the class…

    Alright, this should be exactly what you want:
    http://jsfiddle.net/D7kqG/5/

    It’s collapsing and expanding the content div automatically for the home tab.

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

Sidebar

Related Questions

I have a simple jquery tab, which works fine in all browser except ie
all. I have built a simple jQuery/PHP chat program that works rather well. However,
I have a page that uses jQuery tabs to tabify a set of HTML
I have a simple horizontal menu that uses JQuery to vertically slide down a
I have a page with tabs on it that you this jQuery script http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/
I have some simple JQuery / Javascript to perform some simple logic for all
I have a simple jQuery script that I'm trying to build upon but I
I have a simple jQuery code that runs on a web page that has
I have a very simple jQuery script.. all I want it to do is
i have some simple jquery tabs: <script> $(function() { $( #tabs ).tabs(); }); </script>

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.