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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:45:22+00:00 2026-05-27T00:45:22+00:00

I have two buttons and two divs(I put one above another). I made info

  • 0

I have two buttons and two divs(I put one above another). I made “info” class visible and “info2” hidden. I need when pressed on “Global” button – “info” div is shown and on the “Asia” button – “info2” div. I tried this code but it’s not working:

$('.corpo_button_asia').click(function(){ 

                $('.info').hide;
                $('.info2').show;


        }); 

$('.corpo_button_global').click(function(){ 

                $('.info').show;
                $('.info2').hide;


        }); 

Here is html code:

<div clas"corpo_buttons">
         <div class="corpo_buttons_global">
                   Global
         </div>
         <div class="corpo_buttons_asia">
                    Asia
         </div>
</div>
<div class="info">
           Info1
</div>
<div class="info2">
           Info2
</div>

and css:

.corpo_buttons
{
height:50px;
}

.corpo_buttons_global
{
position:absolute;
z-index:10;
width:50px;
float:left;
background-color:rgb(23,55,94);
color:#FFF;
padding:2px;
border:thick;
border-color:rgb(23,55,94);
border-width:1px;
border-style:solid;
}

.corpo_buttons_asia
{
position:relative;
z-index:2;
left:45px;
width:50px;
float:left;
padding:2px;
background-color:rgb(197,197,197);
padding:2px;
border:thick;
border-color:rgb(23,55,94);
border-width:1px;
border-style:solid;
}

.info
{
position:absolute;
margin-top:21px;
width:150px;
height:60px;
border:thick;
border-color:#000;
border-width:1px;
border-style:solid;
text-align:left;
padding:5px;
font-size:10px;
}

.info2
{
margin-top:21px;
width:150px;
height:60px;
border:thick;
border-color:#000;
border-width:1px;
border-style:solid;
text-align:left;
padding:5px;
font-size:10px;
visibility: hidden;
}
  • 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-27T00:45:23+00:00Added an answer on May 27, 2026 at 12:45 am

    This could be related to your “visibility: hidden;” in .info2. I’d suggest trying it with “display: none;” instead.

    The way the jquery show/hide methods work is by toggling the display from none to block and back again. Chances are it’s not paying attention at all to your visibility state.

    If your absolutely dependant on visibility in your css you can change the code to toggle that one instead:

    $('.info').css('visibility', 'hidden');
    $('.info2').css('visibility', 'visible');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to trigger two slide-in divs with one button. I have played around
I have two radio buttons next to each other, and even though each one
I have two radio buttons each with a unique ID. When one is clicked,
How do I put the two divs side by side? What if I have
I have two divs as follows: <div class=car-service id=browse-all-button> <p>CAR SERVICE</p> <span>56 Race Ramps</span>
Possible Duplicate: click link below a higher z-index div I have two divs, one
I have the div div.home-top with two other divs div#home-content as float:left and div#home-buttons
I have two buttons on my application. One button starts a new Game (lets
Well I have two buttons, each image in a span, and one should be
I have a button made up of three divs the middle one strecthes out

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.