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

Auto Save

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

              
                <form class="topLabel">

  <header class="form-header quest">
    <h2 class="questHead">A Form of Fantasy</h2>
    <blockquote>The gift of fantasy has meant more to me than my talent for absorbing positive knowledge.”<span> - Albert Einstein</span></blockquote>
    <button type="button">Begin the fantasy</button>
    <p title="Or scroll, if you’re the type that likes to laugh at all of my hard work going to waste.">Press <span>enter</span> to continue or <span>click</span> the button</p>
    </header>
  
  <ul>
  
    <li id="form-field-1" class="quest">
      <fieldset>
        <legend class="questHead">
          Which is better?
        </legend>
        <div class="choices">
          <span class="countNum">
            <input id="Field1_0" name="Field1" type="radio" class="field radio countNum" value="Fantasty" checked="checked" />
            <label class="choice right" for="Field1_0" data-icon="">
              Fantasty
            </label>
          </span>
          <span class="countNum">
            <input id="Field1_1" name="Field1" type="radio" class="field radio" value="Sci-Fi" />
            <label class="choice" for="Field1_1" data-icon="">
              Sci-Fi
            </label>
          </span>
          <span class="countNum">
            <input id="Field1_2" name="Field1" type="radio" class="field radio countNum" value="Don&#039;t make me choose!" />
            <label class="choice" for="Field1_2" data-icon="">
              Don't make me choose!
            </label>
          </span>
          <span class="countNum">
            <input id="Field1_3" name="Field1" type="radio" class="field radio countNum" value="I don&#039;t like either" />
            <label class="choice left" for="Field1_3" data-icon="">
              I don't like either
            </label>
          </span>
        </div>
      </fieldset>
      <button type='button'>Continue</button>
      <p><span>Hint:</span> You can use the 1-4 number keys</p>
    </li>
    
    <li id="form-field-2" class="quest">
      <label class="desc questHead" id="title2" for="Field2">
      How much would you donate to a Kickstarter to bring back Firefly?
      </label>
      <span class="symbol">$</span>
       <span class="col-2-3">
        <input id="Field2" name="Field2" type="text" class="field text currency nospin" value="" size="10" placeholder="22"/>
        <label for="Field2">Dollars</label>
      </span>
      <span class="cents col-1-3">
        .
        <input id="Field2-1" name="Field2-1" type="text" class="field text nospin" value="" size="2" maxlength="2" placeholder="22" />
        <label for="Field2-1">Cents</label>
      </span>
      <button type='button' class='right'>Onward!</button>
    </li>
    
    <li id="form-field-3" class="likert quest stars">
      <table cellspacing="0">
        <caption id="title3" class="questHead">
          Rate the Star Wars movies
        </caption>
        <thead>
          <tr>
            <th>&nbsp;</th>
            <td>Didn't Like At All</td>
            <td>Meh</td>
            <td>Kinda Liked</td>
            <td>Loved!</td>
          </tr>
        </thead>
        <tbody>
          <tr class="statement3" tabindex="0">
            <th>
              <label for="Field3">Episode I - The Phantom Menace</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field3_1" name="Field3" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field3_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field3_2" name="Field3" type="radio" value="Meh" />
              <label for="Field3_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field3_3" name="Field3" type="radio" value="Kinda Liked" />
              <label for="Field3_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field3_4" name="Field3" type="radio" value="Loved!" />
              <label for="Field3_4">4</label>
            </td>
          </tr>
          <tr class="alt statement4" tabindex="0">
            <th>
               <label for="Field4">Episode II - Attack of the Clones</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field4_1" name="Field4" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field4_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field4_2" name="Field4" type="radio" value="Meh" />
              <label for="Field4_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field4_3" name="Field4" type="radio" value="Kinda Liked" />
              <label for="Field4_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field4_4" name="Field4" type="radio" value="Loved!" />
              <label for="Field4_4">4</label>
            </td>
            </tr>
              <tr class="statement5" tabindex="0">
              <th><label for="Field5">Episode III - Revenge of the Sith</label></th>
            <td title="Didn&#039;t Like At All">
              <input id="Field5_1" name="Field5" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field5_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field5_2" name="Field5" type="radio" value="Meh" />
              <label for="Field5_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field5_3" name="Field5" type="radio" value="Kinda Liked" />
              <label for="Field5_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field5_4" name="Field5" type="radio" value="Loved!" />
              <label for="Field5_4">4</label>
            </td>
          </tr>
          <tr class="alt statement6" tabindex="0">
            <th>
              <label for="Field6">Episode IV - A New Hope</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field6_1" name="Field6" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field6_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field6_2" name="Field6" type="radio" value="Meh" />
              <label for="Field6_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field6_3" name="Field6" type="radio" value="Kinda Liked" />
              <label for="Field6_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field6_4" name="Field6" type="radio" value="Loved!" />
              <label for="Field6_4">4</label>
            </td>
          </tr>
          <tr class="statement7" tabindex="0">
            <th>
              <label for="Field7">Episode V - The Empire Strikes Back</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field7_1" name="Field7" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field7_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field7_2" name="Field7" type="radio" value="Meh" />
              <label for="Field7_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field7_3" name="Field7" type="radio" value="Kinda Liked" />
              <label for="Field7_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field7_4" name="Field7" type="radio" value="Loved!" />
              <label for="Field7_4">4</label>
            </td>
          </tr>
          <tr class="alt statement8" tabindex="0">
            <th>
              <label for="Field8">Episode VI - Return of the Jedi</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field8_1" name="Field8" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field8_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field8_2" name="Field8" type="radio" value="Meh" />
              <label for="Field8_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field8_3" name="Field8" type="radio" value="Kinda Liked" />
              <label for="Field8_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field8_4" name="Field8" type="radio" value="Loved!" />
              <label for="Field8_4">4</label>
            </td>
          </tr>
        </tbody>
      </table>
      <button type='button' class='center'>Continue this amazing form</button>
    </li>
    
    <li id="form-field-4" class="quest">
      <label class="desc questHead" id="title104" for="Field104">
        Are you caught up on Game of Thrones?
      </label>
      <div class="arrow">
        <select id="Field104" name="Field104" class="field select medium" tabindex="31" > 
          <option value="Never seen it" selected="selected">
            Never seen it
          </option>
          <option value="Yep, totally caught up" >
            Yep, totally caught up
          </option>
          <option value="I&#039;ve seen some but I&#039;m not caught up" >
            I've seen some but I'm not caught up
          </option>
        </select>
      </div>
      <button type='button'>Almost done!</button>
    </li>
    
    <li id="form-field-5" class="quest">
      <label class="desc questHead" id="title107" for="Field107">
      What is your favorite Fantasty or Sci-Fi movie of all time?
      </label>
      <div>
      <input id="Field107" name="Field107" type="text" class="field text medium" value="" maxlength="255" tabindex="32" onkeyup="" placeholder="LOTR" />
      </div>
      <button type='button'>Go to last step</button>
    </li>
  
    <div class="quest">
    <li id="form-field-6" class="section">
      <section>
        <h3 id="title108" class="questHead">
          Your Information
        </h3>
      </section>
    </li>

    <li id="form-field-7">
      <label class="desc" id="title105" for="Field105">
        Name
      </label>
      <span>
        <input id="Field105" name="Field105" type="text" class="field text fn" value="" size="8" placeholder="Timothy"/>
        <label for="Field105">First</label>
      </span>
      <span>
        <input id="Field106" name="Field106" type="text" class="field text ln" value="" size="14" placeholder="Miller" />
        <label for="Field106">Last</label>
      </span>
    </li>
    
    <li id="form-field-8">
      <label class="desc" id="title110" for="Field110">
        Email
      </label>
      <div>
        <input id="Field110" name="Field110" type="email" spellcheck="false" class="field text medium" value="" maxlength="255" placeholder="tjacobdesign@gmail.com" /> 
      </div>
    </li>
    
    <li id="form-field-9">
      <label class="desc" id="title117" for="Field117">
        Website
      </label>
      <div>
        <input id="Field117" name="Field117" type="url" class="field text medium" value="" maxlength="255" placeholder="tjacobdesign.com" /> 
      </div>
    </li>
    
    <li class="buttons">
      <div>
        <button id="saveForm" name="saveForm" class="btTxt submit" 
          type="submit">Submit</button>
      </div>
    </li>
    </div>
      
  </ul>
  
</form>
              
            
!

CSS

              
                @import "compass/css3";

$orange: #F8623F;
$fontStack: "Libre Baskerville", "Lucida Grande","Lucida Sans Unicode", Tahoma, sans-serif;

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: $fontStack;
  text-align: left;
  line-height: 1.4;
  padding: 30px;
}

.right {
  float: right;
}

input, select {
  font-family: $fontStack;
}

select {
  -webkit-appearance: none;
  border-radius: 2px;
  padding: 1em;
  font-size: 1.5em;
  border: 1px solid $orange;
  width: 100%;
  cursor: pointer;
  &:focus {
    outline: none;
  }
}
.arrow {
  position: relative;
  &:after {
      content: "▾";
      color: $orange;
      font-size: 3em;
      position: absolute;
      top: 5px;
      right: 20px;
      pointer-events: none;
    }
}

label {
  cursor: pointer;
}

p > span {
  text-transform: uppercase;
  font-weight: bold;
}

button {
  font-family: $fontStack;
  display: block;
  padding: 0.6em;
  margin: 0.6em 0;
  border-radius: 3px;
  color: white;
  font-size: 1.5em;
  background: $orange;
  text-shadow: -1px -1px 0 darken($orange, 20%),
    1px 1px 0 lighten($orange, 20%);
  border: 1px solid darken($orange, 20%);
  cursor: pointer;
  &:active, &:focus {
    background: darken($orange, 30%);
  }
}

.topLabel {
  height: 100%;
}

.form-header {
  margin: 0 0 1em 0;
  padding: 0 0 1em 0;
  border-bottom: 1px dotted #ccc;
}

.quest {
  counter-reset: radios;
  min-height: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
}

.currentQuest {
  color: black;
  //border: 1px solid red;
}

.questHead {
  font-size: 2em;
  font-size: 2rem;
}

blockquote {
  position: relative;
  font-style: italic;
  > span {
    font-style: normal;
  }
  &:before {
    content: "“";
    position: absolute;
    left: -0.5em;
    top: -0.2em;
      color: #589F98;
    font-size: 3em;
  }
}

.text {
  font-size: 120%;
}

form ul {
  height: 100%;
  padding: 0;
}
form li {
  list-style: none;
  padding: 0.5em;
  clear: both;
  overflow: hidden;
  position: relative;
}
form li span {
  margin: 0 .3em 0 0;
  float: left;
}
form li div span {
  margin: 0;
  display: block;
  width: 100%;
  float: left;
}
label span,
.section span,
p span,
.likert span {
  display: inline;
  float: none;
}
form li div label,
form li span label {
  font-size: 80%;
  padding-top: 0.25em;
  clear: both;
  display: block;
}
fieldset {
  display: block;
  border: none;
  margin: 0;
  padding: 0;
}
label.desc,
legend { 
  font-weight: bold;
  color: #222;
  padding: 0 0 0.15em 0;
  margin: 0 0 0.15em 0;
  display: block;
}
[type='radio'] {
  display: none;
  &:checked + label {
    border:1px solid darken($orange, 20%);
  }
}
.stars [type='radio']:checked + label {
  background: $orange;
}
.choices {
  width: 100%;
}
.choices > span {
  padding: 5px;
  display: inline-block;
  font-size: 100%;
  line-height: 150%;
  margin: 0;
  width: 25%;
  float: left;
  height: 150px;
}
.choice {
  position: relative;
  height: 100%;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
}
.likert table {
  margin: 0 0 1em 0;
  width: 100%;
  border: 1px solid #dedede;
}
.likert caption {
  font-weight: bold;
  text-align: left;
  margin: 0 0 0.5em 0;
}
.likert input {
  margin: 0.25em 0;
}
.likert tbody td label {
  display: block;
}
.likert thead td,
.likert thead th {
  background-color: #e6e6e6
}
.likert td {
  border-left: 1px solid #ccc;
  text-align: center;
  padding: 0.25em;
  width: 100px;
}
.likert thead td {
  font-size: 85%;
  padding: 10px 6px;
}
.likert th,
.likert td { 
  border-bottom: 1px solid #dedede;
}
.likert tbody th {
  padding: 8px 8px;
  text-align: left;
}
.likert tbody th label {
  color: #222;
  font-weight: bold
}
.likert tbody tr.alt td,
.likert tbody tr.alt th {
  background-color: #f5f5f5;
}
tr:focus {
  outline: 0;
  border: 1px solid $orange;
}
.likert tbody tr:hover td,
.likert tbody tr:hover th,
.likert tbody tr:focus td,
.likert tbody tr:focus th {
  background-color:#FFFFCF;
  border-bottom: 1px solid $orange;
}
form li.section {  
  padding: 1em 0 0 0;
}

.symbol {
  position: absolute;
  left: 5px;
  font-size: 2em;
}

.blaa {
  position: absolute;
  font-size: 2em;
}

%specialInput {
  border: 0;
  border-bottom: 1px dotted slategray;
  min-width: 70px;
  &:focus {
    outline: none;
      border-bottom: 1px solid $orange;
    }
}

input {
  @extend %specialInput;
  width: 100%;
  max-width: none;
}

.col-2-3, .col-1-3 {
  display: inline-block;
  font-size: 2em;
  margin: 0;
  > input {
    @extend %specialInput;
    max-width: 120px;
    width: auto;
  }
}

.col-2-3 {
  > input {
    padding-left: 20px;
  }
}

.countNum {
  position: relative;
  &:after {
      background: white;
      position: absolute;
      bottom: 10px; left: 10px;
      width: 1.4em;
      height: 1.6em;
      padding-left: 0.8em;
      border: 1px solid slategray;
      border-radius: 3px;
      font-size: 0.8em;
      counter-increment: radios;
      content: counter(radios);
    }
}



[data-icon]:before {
  position: absolute;
  top: 55px;
  left: 5px;
  font-size: 8em;
  color: #444;
	font-family: 'iconfont';
	content: attr(data-icon);
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}
[data-icon].left:before {
  left: 0;
  right: auto
}
[data-icon].right:before {
  right: -10px;
  left: auto;
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  src: local('Libre Baskerville'), local('LibreBaskerville-Regular'), url(http://themes.googleusercontent.com/static/fonts/librebaskerville/v1/pR0sBQVcY0JZc_ciXjFsK5gtRqbDAavNCEBluaoIIJc.woff) format('woff');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  src: local('Libre Baskerville Bold'), local('LibreBaskerville-Bold'), url(http://themes.googleusercontent.com/static/fonts/librebaskerville/v1/kH7K4InNTm7mmOXXjrA5v5HBV7zGPK_SGwFjOykAVjn3rGVtsTkPsbDajuO5ueQw.woff) format('woff');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  src: local('Libre Baskerville Italic'), local('LibreBaskerville-Italic'), url(http://themes.googleusercontent.com/static/fonts/librebaskerville/v1/QHIOz1iKF3bIEzRdDFaf5SO-5kXrvlsa0llgP70kI5w.woff) format('woff');
}

@font-face {
	font-family: 'iconfont';
	src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRk9UVE8AAAlgAAsAAAAADbAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAABiEAAAiqPyocGUZGVE0AAAcsAAAAGgAAABxn7KJgR0RFRgAAB0gAAAAdAAAAIAAzAARPUy8yAAAHaAAAAEsAAABgPVfqJGNtYXAAAAe0AAAASgAAAV6gGvL5aGVhZAAACAAAAAAvAAAANgN0SA1oaGVhAAAIMAAAACAAAAAkDvMCuWhtdHgAAAhQAAAAFAAAABQU9ABUbWF4cAAACGQAAAAGAAAABgAGUABuYW1lAAAIbAAAAOgAAAGzyozoa3Bvc3QAAAlUAAAADAAAACAAAwAAeJx1VX1M1GUc//7Ou+OwE0+CYHmBKMLhSx6Km5o4ZiImzsS1SWUNmBIQ4VXkCHFR2qKuAq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ABlAGYAbwBuAHQAIAA6ACAANwAtADYALQAyADAAMQAzAABGb250Rm9yZ2UgMi4wIDogcWJvYmJsZWZvbnQgOiA3LTYtMjAxMwAAcQBiAG8AYgBiAGwAZQBmAG8AbgB0AABxYm9iYmxlZm9udAAAVgBlAHIAcwBpAG8AbgAgADEALgAwAABWZXJzaW9uIDEuMAAAcQBiAG8AYgBiAGwAZQBmAG8AbgB0AABxYm9iYmxlZm9udAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAEAAgECAQMBBAEFAQYHdW5pRjAwMAd1bmlFMDA1B3VuaUUwMDQHdW5pRTAwMAd1bmlFMDAxAAAAAAAB//8AAgABAAAADgAAABgAAAAAAAIAAQADAAcAAQAEAAAAAgAAAAAAAQAAAADMPaLPAAAAAM3Xf8gAAAAAzdd/yA==) format('truetype');
	font-weight: normal;
	font-style: normal;
}
              
            
!

JS

              
                var state = 1, $quests = $('.quest'), pageHeight, totalQuests, questPos, posArray = [], closest;

(function() {
    var lastTime = 0;
    var vendors = ['webkit', 'moz'];
    for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
        window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
        window.cancelAnimationFrame =
          window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
    }

    if (!window.requestAnimationFrame)
        window.requestAnimationFrame = function(callback, element) {
            var currTime = new Date().getTime();
            var timeToCall = Math.max(0, 16 - (currTime - lastTime));
            var id = window.setTimeout(function() { callback(currTime + timeToCall); },
              timeToCall);
            lastTime = currTime + timeToCall;
            return id;
        };

    if (!window.cancelAnimationFrame)
        window.cancelAnimationFrame = function(id) {
            clearTimeout(id);
        };
}());

$(function() {
  
  console.log("init");
  
  pageHeight = $(document).height();
  totalQuests = $quests.length;
  $quests.each(function(i) {
    posArray.push($(this).offset().top);
  });
  
  checkScroll();
  
  $('[type="button"]').on('click', function() { nextStep() });
  
  $(document).on('keyup', function(e)
  {
    console.log("ha");
    if(e.keyCode === 13)
    {
      if(document.activeElement.tagName == "BUTTON")
        return false;
      
      $(document.activeElement).blur();
      nextStep();
      return false;
    };
  });
  
  $(document).on('focus', 'tr', function(ev) {
    var $this = $(this);
    $(document).on('keyup.tr', function(e) {
      var num = e.keyCode - 49; //num keycodes start at 1 == 49
      var $radio = $this.find('[type="radio"]');
      $radio.eq(num).prop('checked', true);
    });
    
  });
  $(document).on('blur', 'tr', function(ev) {
    $(document).off('keyup.tr');
  });
});

function nextStep()
{
  state++;
  var $current = $quests.eq(state);
  $('html, body').animate({
    scrollTop: $current.offset().top
  }, 500);
  
  applyLogic();
}

function applyLogic() {
  var $current = $quests.eq(state);
  
  $current.addClass('currentQuest');
  
  if(state > 1)
    $current.removeClass('currentQuest');
  
  $(document).off('keyup.form');      
  
  //Take care of focusing 
  $current.find('input').first().focus();
  
  var $radio = $current.find('[type="radio"]');
  if($radio.hasClass('radio')) {
    
    $(document).on('keyup.form', function(e) {
      var num = e.keyCode - 49; //num keycodes start at 1 == 49
      $radio.eq(num).prop('checked', true);
    });
  }
  
  $current.find('td').eq(0).focus();
  
}

function checkScroll()
{
  var scrollPos = $('body').scrollTop();
  if(!closest)
    closest = posArray[0];
  
  for(var i = 0; i < posArray.length; i++) {
    if(Math.abs(posArray[i] - scrollPos) <= Math.abs(closest - scrollPos)) {
      state = i;
    }
  };
  
  if(closest !== posArray[state]) {
    closest = posArray[state];
    //applyLogic();
    //console.log(state);
  }
  
  requestAnimationFrame(function(time) {
    //checkScroll();
  })
}

              
            
!
999px

Console