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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:58:49+00:00 2026-05-26T15:58:49+00:00

I am a total jQuery (and JS) beginner. For my first attempt, I want

  • 0

I am a total jQuery (and JS) beginner.

For my first attempt, I want a page which allows a user to specify something in 5 steps (with the option to cancel a step).

And I want to display this process horizontally.

Each step will have a choice of the next (combobox, listbox or radiogroup (which?)) which, when selected will display some text & maybe a graphic concerning the choice and offering the next choice.

Initially:

<choice>

User selects something …

                         <2nd choice>
<text 
 describing the choice>  <undo option>

<following text, describing what the user has selected so far>

user selects a second something …

                                               <3rd choice>
<text                    <text 
 describing the choice>  describing the choice> <undo option>

<following text, describing what the user has selected so far>

Questions:

  1. What’s the best way to do this? A table? I know they can be A Bad Thing, but it sort of looks helpful here.

  2. should I only allow undo of the last option? Actually all permutations of all 5 are valid, so maybe I should forget an undo button and just let the user make choices of anything – which would mean that I don’t reveal those choices one by one – they are always there (which sounds simpler)

  3. since the choice affects the descriptive text (and maybe graphic) and these can be of differing size, how can I Prevent the following text from jumping around when a different choice is made? Or is that acceptable to the user?

I guess I could dimension them all to the size of the largest (I do not want to add scroll bars). But how to get that? I can’t use number of pixels in case user resizes screen(?) or switches CSS sheet (highly unlikely), so I guess percentages? but same problem?

  1. table, divs or what for layout?

And if you have done four impossible things before breakfast, I’d like to to be cross browser with HTML 4 and CSS 2, please.

  • 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-26T15:58:50+00:00Added an answer on May 26, 2026 at 3:58 pm

    jQuery UI is a great choice to kill as many birds as possible with one Javascript stone. Creating a stepped horizontal input process sounds like you need tabs. There are many jQuery tab plugins but I have the most cross-browser success with jQuery UI although design changes can be more difficult because the themeroller takes some getting used to.

    This article has a good illustration of how tabs could be used to make a multi-step form. http://pathfindersoftware.com/2008/03/jquery-form-and/

    From the DOM point of view, I would recommend using DIV’s as your content containers because you can position them in anyway you want to and easily change the layout for different devices and feature detection like moderinzr. You can include tables inside the DIV’s when you want. Many people are pushing to use HTML5 containers like section and header but you’ll find those will start to fail quickly in older browsers.

    The following is an outline of how you could arrange your page and some sample jquery to show you ways to toggle user defined selections which can include images, videos, text or anything you want to display. You could even make your list of available selections and then hide them with CSS, and only show those items when their corresponding form values have been selected.

    One note is to remember the concept of id’s vs. classes. An ID should be a unique identifier, meaning it should only exist once per DOM. In CSS and jQuery ID’s are prefixed with with a hash or pound sign (#myID). Classes can exist multiple times in the DOM and are prefixed with a period (.myClass).

    <div id="selectedValues">
        <p>Your progress:</p>
         <ul id="userSelections">
          <li><a rel="one" class="option remove">Option 1</a></li>
         </ul>
    
      </div>
    
    
    
    <form id="tabbedForm">
    
     <div id="tabs">
        <ul>
            <li><a href="#tabs-1">First Choice</a></li>
            <li><a href="#tabs-2">Second Choice</a></li>
            <li><a href="#tabs-3">Third Choice</a></li>
        </ul>
        <div id="tabs-1">
            <h2>First Choice Form Elements</h2>
                <a rel="one" class="option remove">Option 1</a>
                <a class="next" href="#">Next</a>
    
        </div>
        <div id="tabs-2">
            <h2>Second Choice Form Elements</h2>
                <a rel="two" class="option add">Option 2</a>
                <a class="next" href="#">Next</a>
        </div>
        <div id="tabs-3">
            <h2>Third Choice Form Elements</h2>
                <a rel="three" class="option add">Option 3</a>
                <input type="submit" value="Submit Form">
        </div>
     </div>
    
    </div>
    

    Once you get more involved with jQuery you can add and remove items from a list on the same page to show the user that options have been selected or deleted. The live() function allows jQuery to track dynamic elements on the page that didn’t exist in the DOM when the page was rendered.

    // Basic jquery to show what the user has selected with animation
            $('.option').live('click', function(event) {
                event.preventDefault();
    
                // Get option/value/offering/product id, which can be stored in element attribute like rel
                var id = $(this).attr("rel");
    
                if( $(this).hasClass("remove") ){
                    // Remove option
                    $("#userSelections a[rel='"+ id +"']").fadeOut("fast");
                    $("#userSelections a[rel='"+ id +"']").remove();
                    // toggle class in the options list
                    $("a[rel='"+ id +"']").toggleClass('add');
                    $("a[rel='"+ id +"']").toggleClass('remove');
                }
                else {
                    // Add option
                    $(this).clone().appendTo("#userSelections").append('<li>');
                }
    
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm total beginner in js and JQuery and have to complete such task: I
Total beginner question about jQuery: I have a Form that contains several TextBoxes (input
I'm a total beginner to JavaScript, jQuery, and everything else, so when I saw
I am using jQuery UI and a few other JS libs which in total
I’m adding a total amount value to a DIV through a jQuery Ajax call
I couldn't find anything about getting the total JSON record count using jQuery. Here
Here the total height of all <div> 's are 900 pixels, but the jQuery
I've been working with Jquery fro a grand total of two hours now. Up
How to find total number textbox present in a web form using Jquery?
I'm a total newbie when it comes to Javascript/jQuery so hopefully you can help

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.