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

  • Home
  • SEARCH
  • 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 8520671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:35:55+00:00 2026-06-11T06:35:55+00:00

I have three divs, each containing multiple images. There are also three buttons on

  • 0

I have three divs, each containing multiple images.

There are also three buttons on the page.

I would like to create an effect where clicking on each button fades in the corresponding div and fades out the other two divs.

I have tried to follow code posted previously for similar effects, but have been unsuccessful and am hoping for some help from those who have more skill than I do! Thanks, Ross

The HTML is as follows;

 <div id="GROUP-Join">
    <img class="CentreBox" src="images/CentreBox.png" 
        width="487" height="173">
    <img id="TitleOne" src="images/TitleOne.png" 
        width="339" height="19">
    <img id="TitleTwo" src="images/TitleTwo.png" 
        width="143" height="14">
    <body onLoad="focus();signup.email.focus()"></body>
    <form method="post" name="signup" action="signup.php">
        <input id="EmailAddress" type="text" name="email" 
            placeholder="e-mail" style="color: #000000; 
            font-family: 'Arial'; font-size: 20px; background-color:transparent;     
            border:hidden;" size="24" maxlength="49">
        <input id="Go" type="image" name="submit" src="images/Go.png" 
            alt="submit" value="GO">   
    </form>
 </div>
 <div id="GROUP-About">
    <img class="CentreBox" src="images/CentreBOX.png" 
        width="487" height="173">
    <img id="AboutHead" src="images/AboutHead.png" 
        width="132" height="19">
    <img id="JumpAround" src="images/JumpAround.png" 
        width="379" height="33">
    <img id="Win" src="images/Win.png" 
        width="254" height="15">    
 </div>
 <div id="GROUP-Contact">
    <img class="CentreBox" src="images/CentreBOX.png" 
        width="487" height="173">
    <img id="ContactHeading" src="images/ContactHead.png" 
        width="124" height="19">
    <img id="Email" src="images/e-mail.png" 
        width="24" height="17">
    <img id="Twitter" src="images/tw.png" 
        width="24" height="20">
    <img id="fb" src="images/fb.png" 
        width="10" height="21">    
 </div>
 <button id="button1">Join</button>
 <button id="button2">About</button>
 <button id="button3">Contact</button>  
  • 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-11T06:35:57+00:00Added an answer on June 11, 2026 at 6:35 am

    I’m not sure this is what you’re meaning, but this will fade in each corresponding div and fade out the other two.

    <script type="text/javascript">
        $(document).ready(function () {
            $('#btn1').click(function () {
                $('#div1').fadeIn();
                $('#div2').fadeOut();
                $('#div3').fadeOut();
            });
            $('#btn2').click(function () {
                $('#div1').fadeOut();
                $('#div2').fadeIn();
                $('#div3').fadeOut();
            });
            $('#btn3').click(function () {
                $('#div1').fadeOut();
                $('#div2').fadeOut();
                $('#div3').fadeIn();
            });
        });
    </script>
    

    And the markup:

    <div>
        <div id="div1">
            hello
        </div>
        <div id="div2">
            hello 2
        </div>
        <div id="div3">
            hello 3
        </div>
        <div>
            <input type="button" id="btn1" />
            <input type="button" id="btn2" />
            <input type="button" id="btn3" />
        </div>
    </div>
    

    The jquery fadeIn and fadeOut functions also have callbacks, so you could also do:

    $('#div2').fadeOut(100, 
        function() { $('#div3').fadeOut(100, 
                function() { $('#div1').fadeIn(100); 
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three divs page-left page-right flipper I have images of equal size in
I have a three-column layout, and each column has multiple divs that hold blocks
I have 3 divs containing each other like a Matryoshka doll . For all
I have a layout with a set of divs each containing three fields in
I have three divs stacked on each other but offset so that a part
I have a section of a website that has three divs next to each
I have one UL having 3 Li, There are divs under each LI which
I have three Divs on the page and they are absolute positioned. Lets call
i have three divs like that: <div id=1 >id=1</div> <div id=2>id=2</div> <div id=3>id=3</div> Now
I have a slider-like widget which is basically, a div of sub-divs containing 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.