Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                  <div class="form-wrapper">
    
    <div id="progress">
           <div class="circle-1 circle active"></div>
           <div class="circle-2 circle"></div>
      <div class="circle-3 circle"></div>
       </div>
    
    <form id="mst-form" action="">
      <fieldset class="field-1">
      
                <label for="one" class="form-label anim-each">Field One</label>
                <input type="text" id="one" class="el-margin anim-each">

                <label for="two" class="form-label anim-each">Field Two</label>
                <input type="text" id="two" class="el-margin anim-each">

                <label for="three" class="form-label anim-each">Field Two</label>
                <input type="text" id="three" class="el-margin anim-each" >
  
        
                <div class="rt-btn-holder btn-fade">
                        <button class="ghost-btn weight-thin btn-font-size next-1">next</button>
                </div>
      
      </fieldset>
    
      <fieldset class="field-2">
      
                <label for="four" class="form-label anim-each">Field Four</label>
                <input type="text" id="four" class="el-margin anim-each">

                <label for="five" class="form-label anim-each">Field Five</label>
                <input type="text" id="five" class="el-margin anim-each">

                <label for="six" class="form-label anim-each">Field Six</label>
                <input type="text" id="six" class="el-margin anim-each" >
                
                <div class="lft-btn-holder btn-fade">
                        <button class="ghost-btn weight-thin btn-font-size prev-1">prev</button>
                </div>
                       
                       
                <div class="rt-btn-holder btn-fade">
                        <button class="ghost-btn weight-thin btn-font-size next-2">next</button>
                </div>
      
      </fieldset>
      
      <fieldset class="field-3">
      
                <label for="seven" class="form-label anim-each">Field Seven</label>
                <input type="text" id="seven" class="el-margin anim-each">

                <label for="eight" class="form-label anim-each">Field Eight</label>
                <input type="text" id="eight" class="el-margin anim-each">

                <label for="nine" class="form-label anim-each">Field Nine</label>
                <input type="text" id="nine" class="el-margin anim-each" >
                
                <div class="lft-btn-holder btn-fade">
                        <button class="ghost-btn weight-thin btn-font-size prev-2">prev</button>
                </div>
                       
                       
                <div class="rt-btn-holder btn-fade">
                        <input type="submit" name="submit" class="ghost-btn weight-thin btn-font-size submit">
                </div>
      
      </fieldset>
        
    
    </form>
    
    </div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,700');

html {
    height: 100%;
    padding: 0;
    margin: 0;
}

body {
	background-color: #324c5b;
	color: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
        -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  justify-content: center;
	font-weight: 100;
	font-size: 1em;
	font-family: 'Open Sans', sans-serif;
	overflow: hidden;
	overflow-y: scroll;
	min-height: 100%;
}

.form-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2em;
}

/*********************
    Button Styles
*********************/

.ghost-btn {
  background: transparent;
  border: 2px solid white;
  border-radius: 4px;
  color: white;
  padding: .2em 2em;
  text-transform: uppercase;
  font-family: 'Open Sans', sans-serif;
  transition: .25s ease;
}

.ghost-btn:hover {
  background-color: white;
  color: #324c5b;
}

.rt-btn-holder {
	float: right;
}

.lft-btn-holder {
  float: left;
}

.opening-btn {
	font-size: .8em;
}

.btn-font-size {
    font-size: 2em;
}

/**************
    Form
**************/

#progress {
    counter-reset: circle;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-bottom: 2em
}

.circle {
    background-color: gray;
    border-radius: 50%;
    color: #283d4a;
    font-size: 1.5em;
    font-weight: 500;
    margin: 0 .8em;
    position: relative;
    height: 50px;
    width: 50px;
}

.circle:before {
    content: counter(circle);
	counter-increment: circle;
    position: absolute;
    top: 10px;
    left: 0;
    right: 0
}

.circle.active {
	background-color: white;
}

fieldset {
    border: none;
    max-width: 1200px;
}

label {
/*     clear: both; */
/*     display: block; */

}

input[type="text"] {
    background: transparent;
    border: 0;
    border-bottom: 2px solid #aaaaaa;
    color: #e5e5e5;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.8em;
    font-weight: 100;
    outline: none;
    padding: 0 0 .25em .15em;
    width: 100%;
}

input[type="text"]:focus {
    border: 0;
    border-bottom: 2px solid white;
}

.el-margin {
    margin: 0 0 1.8em ;
}

.form-label {
    font-size: 1.9em;
    margin-bottom: .25em;
}

.hidden-fields {
	opacity: 0;
}

.hide-fields {
    opacity: 0;
}

/****************
    Fieldsets
****************/

fieldset {
    min-height: 500px;
}

.field-2, .field-3 {
    display: none;
}
              
            
!

JS

              
                (function(){

'use strict';
    
    var field1 = ('.field-1'),
        field2 = ('.field-2'),
        field3 = ('.field-3'),
        circle1 = ('.circle-1'),
        circle2 = ('.circle-2'),
        circle3 = ('.circle-3');


//var tween = new TimelineMax();    
var tween = new TimelineLite();    
    

//Screen One
function screenOne(){
    var next = document.querySelector('.next-1');
    
  
  
    next.addEventListener('click', function(e) {
      e.preventDefault();
      
         //circles rotate backwards and previous number is highlighted with .active class and removed from next circle (currCircle, nextCircle)
         nextCircle(circle1, circle2);
        
        //When NEXT button is clicked the next fieldset shows and the previous hides (prevField, nextField)
        nextFieldSet(field1, field2);
         

    });

  
}screenOne();
    

    
//Screen Two
function screenTwo(){
    var next = document.querySelector('.next-2'),
        prev = document.querySelector('.prev-1');
        

    next.addEventListener('click', function(e) {
    
      e.preventDefault();
    
         //circles rotate backwards and previous number is highlighted with .active class and removed from next circle (currCircle, nextCircle)
        nextCircle( circle2, circle3);
        
        
        //When NEXT button is clicked the next fieldset shows and the previous hides (prevField, nextField)
        nextFieldSet(field2, field3);
        
    });
    
    /**How could I or should I combine these into the same tween--this is exhibiting some strange behavior. I      **assume this because each function`previousCircle` && `previouosFieldSet` have seperate tweens 
     **Also could I just reverse the above functions `nextCircle` && `nextFieldset` instead of creating the        **below functions?
     **Thanks to anyone for help on this!!!!:) 
     */ 
    prev.addEventListener('click', function(e) {
        
        e.preventDefault();
        
        //.active class and removed prom next circle (prevCircle, currCircle)
        previousCircle(circle1, circle2);
        
        //next fieldset shows and the previous hides (prevField, currField)
        previousFieldSet(field1, field2);
    });
    
    
}screenTwo();
    
  
//Screen Six
function screenThree(){
    var prev = document.querySelector('.prev-2');
        

    prev.addEventListener('click', function(e) {
        
        e.preventDefault();
        
        //.active class and removed prom next circle (prevCircle, currCircle)
        previousCircle(circle2, circle3);
        
        //Prev fieldset shows and the previous hides (prevField, currField)
        previousFieldSet(field2, field3);
    });
    
    
}screenThree();
    
//When NEXT button is clicked the next fieldset shows and the previous hides
function nextFieldSet(currField, nextField){
    var each = ('.anim-each');
    var btnFAde = ('.btn-fade');
    
  //this seems off to me to have display: 'none' and opacity: 0 but it was the only waht to get a smooth fade
    tween
      .to(currField, .1, {opacity:0, display: 'none', y:-100})
         .to(nextField, .1, {display: 'block', opacity: 1})
         .staggerFrom(each, .25, {opacity: 0, y:100}, .1)
         .from(btnFAde, .1, {opacity: 0}, '-=.5');
}
    
//When NEXT button is clicked the next fieldset shows and the previous hides
function previousFieldSet(prevField, currField){
    var btnFAde = ('.btn-fade');
    tween.to(currField, .25, {opacity:0, display: 'none', y: 0})
         .to(prevField, .25, {display: 'block', opacity: 1, y:0})
         .to(btnFAde, .1, {opacity: 1});

}  
    
/*When PREV button is clicked circles in the progress section rotate backwards and **previous number is highlighted with .active class and removed prom next circle
*/
function previousCircle(prevCircle, currCircle) {
    
        tween.to(prevCircle, .15, {rotationY: -360, className: '+=active'})
        .to(currCircle, .15, {rotationY: -360, className: '-=active'});
}


/*When NEXT button is clicked circles in the progress section rotate forwards and the **next number is highlighted with .active class and removoed from previous circle
*/
function nextCircle(currCircle, nextCircle) {

        tween
          .to(currCircle, .15, {rotationY: 360, className: '-=active'})
        .to(nextCircle, .15, {rotationY: 360, className: '+=active'});

}

    
}()); //wrapper
              
            
!
999px

Console