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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:53:07+00:00 2026-05-24T00:53:07+00:00

Html code is: <div id=questions> <ul> <li class=selected><a href=#fly>Fly</a></li> <li><a href=#fly1>Fly 1</a></li> </ul> <div

  • 0

Html code is:

<div id="questions">
  <ul>
       <li class="selected"><a href="#fly">Fly</a></li>
       <li><a href="#fly1">Fly 1</a></li>
  </ul>

 <div id="fly" style="display: block;">   
   <div id="question141">
   <div id="question104">
   <div id="question80">
   <div id="question79">
 </div>
 <div id="fly1">
   <div id="question141">
   <div id="question104">
   <div id="question80" >
   <div id="question79" >
 </div>
</div>

jQuery:

<script>
jQuery(document).ready(function(){
    jQuery('#questions  div').hide();
    jQuery('#questions  div:first').show();
    jQuery('#questions  ul li:first').addClass('active');

    jQuery('#questions  ul li a').click(function(){
        jQuery('#questions  ul li').removeClass('active');
        jQuery(this).parent().addClass('active');
        var currentTab = jQuery(this).attr('href');
        jQuery('#questions  div').hide();
        jQuery(currentTab).show();
        return false;
    });
});
</script>

Above code has two tabs and i am using jQuery to show tabs on click. But when i click any tab. The elements inside the tab does not show. Am i doing something wrong?

  • 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-24T00:53:08+00:00Added an answer on May 24, 2026 at 12:53 am

    When you say jQuery(‘#questions div’).hide() or show() it will hide all divs inside #questions div. Please try below code it will work for you.

    <script>
    jQuery(document).ready(function(){
        jQuery('#questions > div').hide();
        jQuery('#questions  div:first').show();
        jQuery('#questions  ul li:first').addClass('active');
    
        jQuery('#questions  ul li a').click(function(){
            jQuery('#questions  ul li').removeClass('active');
            jQuery(this).parent().addClass('active');
            var currentTab = jQuery(this).attr('href');
            jQuery('#questions > div').hide();
            jQuery(currentTab).show();
            return false;
        });
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My html code is: <div title=test class=xyz>Tesing</div> I want it to look like: <a
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
This is my html code : <div id=d1 class=division> <input type=button value=one class=division> </div>
I have this html code: <div class=action> some_text <a class=delete_action name=q1>some</a> </div> <div class=action>
I have this HTML code which simulates a dropdown multi-checkbox <div> <div class=select> <span>Select
Hello i have an HTML Code like this <div id=top> <div class=panel> <h1>toppanel</h1> <p>Content
Consider the following html code: <div id='x'><div id='y'>Y content</div>X content</div> I'd like to extract
I have this HTML code: <div id=main> <div id=dv_7>...</div> <div id=dv_1>...</div> <div id=dv_8>...</div> <div
I have HTML code like this : <div> <a>Link A1</a> <a>Link A2</a> <a>Link A3</a>
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some

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.