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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:37:31+00:00 2026-06-03T11:37:31+00:00

I have to create a page in HTML5 using jQuery in which all questions

  • 0

I have to create a page in HTML5 using jQuery in which all questions will be there in the form of table. By clicking on a particular question – it’s answer should appear sliding; on closing that answer the slider should go back and the questions should appear.

How is this possible? Should I use <div> for values or to fetch it from XML? Please guide with your suggestions and tutorials.

  • 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-03T11:37:32+00:00Added an answer on June 3, 2026 at 11:37 am

    Here is a primordial example on how to do it:

    demo jsBin

    you need this HTML structure:

    <div class="slider_container"> <!-- overflow:hidden; -->
    <div class="slider">  <!-- position:absolute;width:loooot; -->
    
      <div class="box">
          <h2>Questions</h2>
          <ul class="goto">
            <li>Question 1</li>
            <li>Question 2</li>
            <li>Question 3</li>
            <li>Question 4</li>
          </ul>
      </div>
      <div class="box"><h2>ANSWER 1<span class="back">&lt; back</span></h2>box text...</div>
      <div class="box"><h2>ANSWER 2<span class="back">&lt; back</span></h2>box text...</div>
      <div class="box"><h2>ANSWER 3<span class="back">&lt; back</span></h2>box text...</div>
      <div class="box"><h2>ANSWER 4<span class="back">&lt; back</span></h2>box text...</div>
    
    </div>
    </div>
    

    And this basic jQuery:

    var galW = 600; // set here the 'slider container' width
    
    $('ul.goto li').on('click',function(e){
      e.preventDefault();
      var thisIndex = $(this).index()+1;  
      $('.slider').stop(1).animate({left: -(galW*thisIndex)}, 1000);  
    });
    
    $('span.back').on('click',function(){
      $('.slider').stop(1).animate({left: 0}, 1000); 
    });
    

    what we do here is: get the index N of the clicked li element +1.
    +1 cause we are already looking at the first box (with the questions), but all the other .box elements will be +1 index higher.

    After we have that number we just animate the slider at “speed” (time) 1000 doing some simple math: we multiply the gotten index N by the ‘viewport’ width.

    To go back we just animate the .slider back to the left:0px (or just ‘0’) position.

    If you don’t understand some of the methods I used, you can find them here: http://api.jquery.com/

    (PLEASE next time show some effort in asking your questions so we can look at some code of yours. Thanks! Happy coding)

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

Sidebar

Related Questions

I have a login page using jQuery Mobile which contains the following code: <div
We are starting to create an application using JavaScript and HTML5 which will use
I have a Create new account page. The form is in page named Register.php
Here is my problem: The Problem I have created Tabs using jQuery which is
We have a single page application which loads all content through ajax calls to
I have a div on my home page which uses a jQuery plugin called
I have to create a web page that for the purposes of this question
I have set permission to allow anonymous user to create page. but when the
i have to create an asp.net page dynamically on runtime. It should work like
I have my views render to route requests like /controller/action (for instance, /Page/Create), so

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.