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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:35:19+00:00 2026-05-27T15:35:19+00:00

i am trying to animate a div , what i need is when click

  • 0

i am trying to animate a div, what i need is when click a button i want to hide a div and show another div that is next child.

here is my fiddle.

I am trying to do like this this site here you can see when you click the learmore link which is in the top-right hand side then another div content open like sliding.

  • 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-27T15:35:20+00:00Added an answer on May 27, 2026 at 3:35 pm

    DEMO jsBin

    var c=0;
    $('.slide:gt(0)').hide();
    $('#learn').click(function(){
      c++;
      $('.slide').eq(c).css({zIndex:c}).show('slow');
    });
    

    HTML:

      <div id="slider">
        <div id="learn">Learn more</div>
        <div class="slide s1">I'm slide 1</div>
        <div class="slide s2">I'm slide 2</div>
        <div class="slide s3">I'm slide 3</div>
      </div>
    

    CSS:

      #slider{
        position:relative;
        width:340px;
        height:340px;
      }
      #learn{
        position:absolute;
        right:0px;
        z-index:2;          /*set a higher Z-index if you have more slides*/
        cursor:pointer;
      }
      .slide{
        position:absolute;
        right:0px;         /*important!! To 'slide' from right to left*/
        top:0px;           
        width:300px;
        height:300px;
      }
    

    If you have a defined number of slides you can keep the code intact, in the other hand I’d suggest you to – when the last slide is reached – hide the #learn programatically with jQuery. Let me know if you need help with that one.

    Happy coding

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

Sidebar

Related Questions

I am trying to animate a div when the user click the button. Each
I've got some code that uses toggle to show and hide a div, but
I'm trying to animate a div so that when the page load it has
I am trying to animate my #main div so that it fades out and
I am trying to find a way to animate a div using jQuery to
I am trying to animate an object, let's say its a car. I want
I'm trying to animate a dot from one point to another on a map.
I'm trying to animate a simple ImageView in my application and I want it
I have a div which I am trying to animate from 0px to npx
So I'm trying to figure out how to show an invisible div after an

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.