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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:28:40+00:00 2026-06-11T05:28:40+00:00

I am creating a multiple-step form using jQuery and I am just in the

  • 0

I am creating a multiple-step form using jQuery and I am just in the very begining stages of writing this functionality. You can see a jsfiddle here: http://jsfiddle.net/ay3HV/1/

When you press the Next Button, the first part of the form fades out and the next fades in. BUT this only works on the first set of form elements (there are 3 total). My HTML is formatted like so:

<form>
<article>
form slide a elements
</article>
<article>
form slide b elements
</article>
<article>
form slide b elements
</article>
</form>

I am using Jquery to hide all articles that are NOT the first, and then hide that set on next, and reveal the second set like so:

$("article:not(:last)").append('<a class="next" href="#">Next</a>');
    $("article:nth-child(1n+2)").hide();


    $("a.next").on("click", function(){
        var thisPar = $("this").parent("article");

        if (thisPar = $("article:first")){
            thisPar.hide();
            thisPar.next().fadeIn();
        }

        else {
            thisPar.hide();
            thisPar.next().fadeIn();
        }

    });

For some reason this is not working after the first click on next. Any ideas? (see JSFiddle)

  • 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-11T05:28:41+00:00Added an answer on June 11, 2026 at 5:28 am

    here’s a simple solution: http://jsfiddle.net/ay3HV/23/

    This is the JS:

    (function($){ 
        $(function() {
            $("article:not(:last)").append('<a class="next" href="#">Next</a>');
            $("article:nth-child(1n+2)").hide();
            $("a.next").on("click", function(e){
                e.preventDefault();
                // your if statement was redundant
                $(this).closest("article").hide().next().fadeIn();
            });
        });
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating multiple asynchronous web requests using IObservables and reactive extensions. So this creates
I'm creating multiple form retrieving data from jquery. after that i want to work
I am creating multiple video panels using vlcj. For each video window I should
I'm having trouble creating multiple AS3 classes, I've got my document class but can't
I'm creating multiple borders to element using box-shadow, but they don't show at Webkit.
I have a very large script which is creating multiple views. In a number
I am creating multiple tabs dynamically when my application starts up. Put it this
Issue: To avoid creating multiple objects or multiple queries when possible. I am using
How to create a multiple step registration form in iOS. Which is the best
I am creating multiple persistent store in my application, but I am using only

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.