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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:52:07+00:00 2026-05-18T19:52:07+00:00

I am currently working on creating a tabbed interface that has one tab of

  • 0

I am currently working on creating a tabbed interface that has one tab of rich flash-like content and the rest of the tabs that are full of simple text. Bit of a long one here but I’ve pretty much exhausted my options and want to let you know what I’ve tried. I feel like there should be a solution to my problem that doesn’t feel like a terrible hack but I’m not sure what else to try.

The Trials
To create my tabs I decided to go with jQuery for convenience sake and was happily plugging along making the usual non UI/Tools tabbed structure. That is to say, like this:

<div class="page">
    <div class="tabs">
        <ul class="nav">
            <li href="#tab_1">Tab one</li>
            <li href="#tab_1">Tab one</li>
        </ul>
    </div>
    <div class="content">
        <div id"tab_1">Stuff</div>
        <div id"tab_2">Words</div>
    </div>
</div>

From here I have all the usual CSS and jQuery business to get this going and was happy with the results. That is, until I tried to add the rich content. It loads just fine and I can’t really complain about that, but I was asked to make it so that the rich content does not reload upon leaving to another tab and returning.

This befuddled me for some time, but after reading jQuery’s documentation on the .hide() and .show() functions it became all too clear what was going on. hide() and show() are equivalent to display = “none” display = “block” and so every time I made these calls my content was being destroyed and needed to be reloaded.

For the sake of clarity I will show you what my jQuery looked like:

$(document).ready(function() {
    var tabContainers = $('div.content > div');   
    tabContainers.hide().filter(':first').show();

    $('div.tabs ul.nav a').click(function () {

    tabContainers.hide();
    tabContainers.filter(this.hash).show();
    //selected is a CSS attribute to highlight the tabs
    $('div.tabs ul.nav a').removeClass('selected');
    $(this).addClass('selected');
    return false;
    }).filter(':first').click();
});

At this point I made some changes to the above code and instead of using show() and hide() on the rich content I began setting the visibility. So now my simple content was using .hide() and .show() since it didn’t need to reset and my rich content was using visibility. Unfortunately now it was all disappearing and reappearing nicely but with a big gap from the rich content page since visibility does not physically remove the content from the page, just it’s visibility.

I then researched some more and discovered the .height() call in jQuery and decided to try to employ it. It worked. I was able to call height() to crush down the div and then reexpand it to fit the current content.

I was thrilled to see this work in both FF and Chrome but then I opened it in IE8. Nothing. The giant gap was still there. Crestfallen I once again turned to the internet and discovered that it was because I was lacking the standard DOCTYPE call at the top of my page and so IE was running in Quirks mode. I made the change and bam, it worked.

Now the fun part, this is actually intended to run in Facebook. I already had some HTML in a php file from a test run and I swapped it out for this new code. I opened up Chrome, FF, and IE and lo and behold Chrome and FF both work; IE, on the other hand, has the same old giant gap that I had just gotten rid of.

The Question
At this point I’m not sure what else to attempt. I was hoping that jQuery Tools Tabs or jQuery UI Tabs might be of some use but they both seem to destroy the content and reload it as well. What I would be most happy with would be to create an interface that didn’t require my resizing the divs like this but at this point I just want something functional to work off of.

Is there any way to either make the resizing work or to make the tabs not destroy the content upon switching to one another? If you look at various Facebook games some of them seem to have the tabbed interface behavior I’m looking for but I’m just not sure how to replicate it. Can anyone point me in a new direction or suggest a fix?

  • 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-18T19:52:07+00:00Added an answer on May 18, 2026 at 7:52 pm

    This is from jQuery UI:

    …my slider, Google Map, sIFR etc. not work when placed in a hidden (inactive) tab?

    There’s an easy workaround. Use the off-left technique for hiding inactive tab panels. E.g. in your style sheet replace the rule for the class selector ".ui-tabs .ui-tabs-hide" with

    .ui-tabs .ui-tabs-hide {
        position: absolute;
        left: -10000px;
    }
    

    And then hide tabs normally.

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

Sidebar

Related Questions

I'm currently working on creating a new C# project that needs to interact with
I am currently working on a class that uses another class which has only
Hey guys... I'm working on creating one of my first websites and currently have
Currently I'm working on an application that has to parse a large XML file
Im currently working on creating some appwidgets for my application; one of those is
The company I'm currently working for is using Selenium for Uniting-Testing our User Interface.
I'm currently working on creating electronic version of various request forms. Each form will
I'm currently working on creating a private messaging system, (PHP/MySQL) in which users can
I am currently working on creating an import-based pipeline for my indie game using
I'm currently working on creating my own blog section.. After brainstorming a little while

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.