123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              //all content container
.container
  
  //main header
  h1.main-header Credit Card #[span Checkout] Inspiration
  
  //subheader
  .subheader
    p (Click #[strong 'Checkout'] button to check the effect)
  
  //submenu with contact links
  .submenu
    
    //submenu item
    .submenu__item
      a(href="https://github.com/eisenfox/credit-card-checkout" title="Check on GitHub" target="_blanc") 
        i(class="material-icons") loyalty
        | Check on GitHub
        
    //submenu item
    .submenu__item
      a(href="http://100dayscode.co.uk/" title="Check Codepen Challenge" target="_blanc") 
        i(class="material-icons") loyalty
        | Check Codepen Challenge
        
  //content block with the effect
  .content-block
  
    //card checkout block (cart and checkout is here)
    .cart-checkout
    
      .cart-checkout__inner
    
        //cart block
        .cart.cart-checkout__cart

          //cart image
          .cart__image
            img.cart__image-img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/694606/cycle.png" alt="Cycle image in the Cart")

          //cart logo
          .cart__logo
            img.cart__logo-img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/694606/cycle-logo.png" alt="Cycle Shop Logo")

          //cart 'checkout' btn
          .cart__checkout
            button#checkout-btn.cart__checkout-btn.btn(type="button" title="Checkout") Checkout

          //cart 'close' btn
          .cart__close
            button#close-btn.cart__close-btn.js-hidden(type="button" title="Close")

        //checkout block
        .checkout.cart-checkout__checkout.js-hidden

          //checkout info block
          .checkout__info

            //checkout info item
            .checkout__info-item.js-hidden

              //checkout info label
              span.checkout__info-label Item

              //checkout info value
              span.checkout__info-value.text.text--dark Pro Speed Bike

            //checkout info item
            .checkout__info-item.js-hidden

              //checkout info label
              span.checkout__info-label Price

              //checkout info value
              span.checkout__info-value.text.text--accent $950

          //checkout card block
          .checkout__card

            //checkout card form
            form.checkout__form

              //checkout form block
              .checkout__form-block.checkout__form-block--animated.js-hidden

                //checkout input
                input#card-holder.checkout__form-input(type="text")
                
                //checkout label
                label.checkout__form-label(for="card-holder") Card Holder

                //checkout icon
                .checkout__form-icon
                  i.material-icons person_outline

              //checkout form block
              .checkout__form-block.checkout__form-block--animated.js-hidden

                //checkout input
                input#card-num.checkout__form-input(type="text")
                
                //checkout label
                label.checkout__form-label(for="card-num") Card Number

                //checkout icon
                .checkout__form-icon
                  i.material-icons credit_card

              //checkout form block
              .checkout__form-block.checkout__form-block--space-btw.checkout__form-block--animated.js-hidden
                
                //checkout form block
                .checkout__form-block.checkout__form-block--no-m
                
                  //checkout input
                  input#card-expire.checkout__form-input.checkout__form-input--no-pr(type="text")

                  //checkout label
                  label.checkout__form-label(for="card-expire") Expires
                
                //checkout form block
                .checkout__form-block.checkout__form-block--no-m
                
                  //checkout input
                  input#card-cvc.checkout__form-input.checkout__form-input--no-pr(type="password")

                  //checkout label
                  label.checkout__form-label(for="card-cvc") CVC

              //checkout form block
              .checkout__form-block.checkout__form-block--space-around.checkout__form-block--mt-2.checkout__form-block--animated.js-hidden

                //checkout button
                button#pay-now.checkout__form-btn.btn.btn--disabled(type="button") Pay Now

                //checkout span block
                span.checkout__form-text or

                //checkout button
                button.checkout__form-btn.btn(type="button") Use Paypal
               
               
              
              
              

              
            
          
!
            
              //COMMON VARIABLES
$dark-theme-color: #1c1c1c;
$accent-theme-color: #D81E5B;
$settings-theme-color: #ebe9ea;
$settings-dark-theme-color: #b1b1b1;
$light-theme-color: #fff;

//MIXINS

//transitions mixin
@mixin transition-mix($property: all, $duration: 0.2s, $timing: linear, $delay: 0s) {
  transition-property: $property;
  transition-duration: $duration;
  transition-timing-function: $timing;
  transition-delay: $delay;
}

//position absolute mixin
@mixin position-absolute ($top: null, $left: null, $right: null, $bottom: null) {
  position: absolute;
  top: $top;
  left: $left;
  right: $right;
  bottom: $bottom;
}

//SETUP STYLES
html { box-sizing: border-box; }

*, 
*:before, 
*:after { box-sizing: inherit; } 

body {
  font: {
    family: 'Quicksand', sans-serif;
    size: 16px;
  }
  color: $dark-theme-color;
}

.container {
  width: 850px;
  margin: 50px auto 0px auto;
  text-align: center;
}

h1 {
  margin: 0;

  font: {
    weight: 400;
    size: 35px;
  }

  span {
    font: {
      family: 'Elsie Swash Caps', cursive;
    }
    color: $accent-theme-color;
  }
}

.submenu {
  display: flex;
  justify-content: center;
  margin: 10px auto 0;
}

.submenu__item {
  display: flex;
  align-items: center;
  justify-content: center;
  
  &:not(:last-child) {
    margin-right: 30px;
  }

  a {
    @include transition-mix;

    display: inline-flex;
    align-items: center;

    font: {
      size: 17px;
    }
    color: inherit;
    text-decoration: none;

    &:hover {
      color: $accent-theme-color;
    }

    i {
      color: $accent-theme-color;
      margin-right: 5px;
    }
  }
}

.content-block {
  margin-top: 50px;
}

//BASIC STYLES

img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

//text styles variations
.text--dark {
  color: $dark-theme-color;
}

.text--accent {
  color: $accent-theme-color;
}

//cart-checkout block styles
$cart-checkout-padding: 50px;

.cart-checkout {
  position: relative;
  
  padding: $cart-checkout-padding;
  
  background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/694606/cycle-bg.jpg') 0 0 no-repeat;
  background-size: cover;
  
  //overlay
  &:after {
    @include position-absolute($top: 0, $left: 0);
    
    display: block;
    width: 100%;
    height: 100%;
    
    content: '';
    
    background-color: rgba($dark-theme-color, .6);
    
    z-index: 1;
  }
}

//cart-checkout inner styles
.cart-checkout__inner {
  position: relative;
  
  display: flex;
  justify-content: center;
  
  z-index: 5;
  
  overflow: hidden;
}

//btn styles
$btn-width: 180px;
$btn-padding-vert: 8px;
$btn-bg-color: $accent-theme-color;

.btn {
  @include transition-mix();
  
  padding: $btn-padding-vert 0;
  width: $btn-width;
  
  font: {
    family: inherit;
    size: inherit;
    weight: 700;
  }
  color: $light-theme-color;
  text-align: center;
  
  border: none;
  outline: none;
  background-color: $btn-bg-color;
  border-radius: 5px;
  
  cursor: pointer;
  
  &:hover {
    background-color: darken($btn-bg-color, 10%);
  }
}

//disabled btn styles
$btn-disabled-bg: $settings-dark-theme-color;

.btn--disabled {
  background-color: $btn-disabled-bg;
  
  cursor: default;
  
  &:hover {
    background-color: $btn-disabled-bg;
  }
}

// cart styles
$cart-init-width: 400px;
$cart-padding-vert: 30px;
$cart-padding-horz: 10px;
$cart-bg: $settings-theme-color;

.cart {
  position: relative;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  width: $cart-init-width;
  padding: $cart-padding-vert $cart-padding-horz;
  
  background-color: $cart-bg;
  
  overflow: hidden;
}

//cart image styles
$cart-image-width: 95%;
$cart-image-max-width: 320px;

.cart__image {
  width: $cart-image-width;
  max-width: $cart-image-max-width;
}

//cart logo styles
$cart-logo-width: 120px;
$cart-logo-offset-top: 20px;

.cart__logo {
  width: $cart-logo-width;
  margin-top: $cart-logo-offset-top;
}

//cart checkout styles
$cart-checkout-offset-vert: 20px;

.cart__checkout {
  margin-top: $cart-checkout-offset-vert;
}

//cart close styles
$close-btn-dimensions: 35px;
$close-btn-bg-color: $accent-theme-color;

$close-btn-icon-elem-width: 3px;
$close-btn-icon-elem-height: 30px;
$close-btn-icon-elem-bg: $light-theme-color;

.cart__close {
  @include position-absolute($bottom: - 3px, $right: 0);
}

.cart__close-btn {
  @include transition-mix();
  
  position: relative;
  
  width: $close-btn-dimensions;
  height: $close-btn-dimensions;
  
  border: none;
  outline: none;
  background-color: $close-btn-bg-color;
  
  cursor: pointer;
  
  &:hover {
    background-color: darken($close-btn-bg-color, 10%);
  }
  
  //close icon elements
  &:before,
  &:after {
    display: block;
    width: $close-btn-icon-elem-width;
    height: $close-btn-icon-elem-height;
    
    content: '';
    
    background-color: $close-btn-icon-elem-bg;
  }
  
  &:before {
    @include position-absolute($top: 3px, $left: 16px);
    
    transform: rotate(- 35deg);
  }
  
  &:after {
     @include position-absolute($top: 3px, $right: 16px);
    
     transform: rotate(35deg);
  }
}

//checkout block styles
$checkout-width: 500px;
$checkout-bg: $light-theme-color;
$checkout-padding: 30px;

.checkout {
  width: $checkout-width;
  padding: $checkout-padding;
  flex-shrink: 0;
  
  text-align: left;
  
  background-color: $checkout-bg;
}

//checkout info item styles
$info-item-color: $settings-dark-theme-color;
$info-item-offset-vert: 5px;

.checkout__info-item {
  font: {
    weight: 700;
  }
  text-transform: uppercase;
  color: $info-item-color;
  
  &:not(:last-child) {
    margin-bottom: $info-item-offset-vert;
  }
}

//checkout info label styles
.checkout__info-label {
  
  //':' symbol
  &:after {
    content: ':';
  }
}

//checkout card styles
$checkout-card-offset-vert: 45px;

.checkout__card {
  margin-top: $checkout-card-offset-vert;
}

//checkout form styles
$checkout-form-color: $settings-dark-theme-color;

.checkout__form {
  color: $checkout-form-color;
}

//checkout form block styles
$checkout-form-block-offset-vert: 25px;

.checkout__form-block {
  position: relative;
  
  display: flex;
  align-items: center;
  margin-top: $checkout-form-block-offset-vert;
  
  &:first-child {
    margin-top: 0;
  }
}

//checkout block with no margin
.checkout__form-block--no-m {
  margin-top: 0;
}

//checkout block with twice margin
.checkout__form-block--mt-2 {
  margin-top: ($checkout-form-block-offset-vert * 2);
}

//checkout block spaced between
.checkout__form-block--space-btw {
  justify-content: space-between;
}

//checkout block spaced around
.checkout__form-block--space-around {
  justify-content: space-around;
}

//checkout form input styles
$checkout-input-padding-vert: 10px;
$checkout-input-padding-horz: 40px;

.checkout__form-input {
  @include transition-mix();
  
  width: 100%;
  padding: 0 $checkout-input-padding-horz $checkout-input-padding-vert 0;
  
  font: {
    family: inherit;
    size: inherit;
    weight: 700;
  }
  color: $dark-theme-color;
  
  outline: none;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid $settings-dark-theme-color;
  
  //js-focus styles
  &.js-focus {
    border-color: $accent-theme-color;
  }
}

//inputs without padding-right
.checkout__form-input--no-pr {
  padding-right: 0;
}

//checkout form label styles
$checkout-label-color: $settings-dark-theme-color;
$checkout-label-color-focused: $accent-theme-color;

.checkout__form-label {
  @include transition-mix();
  @include position-absolute($top: 0, $left: 0);
  
  color: $checkout-label-color;
  
  //js focus styles
  &.js-focus {
    top: -17px;
    
    font: {
      size: 12px;
    }
    
    color: $checkout-label-color-focused;
  }
}

//checkout icons styles
.checkout__form-icon {
  @include position-absolute($top: 0, $right: 0);
  
  color: $settings-dark-theme-color;
}

//hidden elements styles
.js-hidden {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  
  opacity: 0;
  visibility: hidden;
}

//SEPARATE ELEMENTS ANIMATIONS

//checkout btn animations
@keyframes checkout-btn-anim-out {
  
  0% {
    transform: translate(0,0);
  }
  
  40% {
    transform: translate(-30px, 0);
  }
  
  60% {
    transform: translate(-30px, 0);
  }
  
  100% {
    transform: translate(150%, 0);
  }
  
}

@keyframes checkout-btn-anim-in {
  
  0% {
    transform: translate(150%,0);
  }
  
  40% {
    transform: translate(-30px, 0);
  }
  
  60% {
    transform: translate(-30px, 0);
  }
  
  100% {
    transform: translate(0, 0);
  }
  
}

#checkout-btn {
  transform: translate(0,0);
  
  //animated styles
  &.js-animated-out {
    transition-duration: 0s;
    
    animation: checkout-btn-anim-out .6s ease-out 0s forwards;
  }
  
  //animated styles
  &.js-animated-in {
    transition-duration: 0s;
    
    animation: checkout-btn-anim-in .6s ease-out 0s forwards;
  }
}

//checkout block animations
@keyframes checkout-anim-in {
  0% {
    width: 0;
    height: 0;
    padding-left: 0;
    padding-right: 0;
    
    opacity: 0;
    visibility: hidden;
  }
  
  1% {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    
    opacity: 1;
    visibility: visible;
  }
  
  100% {
    width: $checkout-width;
    padding-left: $checkout-padding;
    padding-right: $checkout-padding;
    
    opacity: 1;
    visibility: visible;
  }
}

@keyframes checkout-anim-out {
  0% {
    width: $checkout-width;
    padding-left: $checkout-padding;
    padding-right: $checkout-padding;
    
    opacity: 1;
  }
  
  
  100% {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    
    opacity: 0;
  }
}

.checkout {
  
  //animated styles
  &.js-animated-in {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    
    opacity: 0;
    visibility: hidden;
    
    animation: checkout-anim-in .5s ease-out 0s forwards;
  }
  
  &.js-animated-out {
    width: $checkout-width;
    padding-left: $checkout-padding;
    padding-right: $checkout-padding;
    
    opacity: 1;
    
    animation: checkout-anim-out .5s ease-out 0s forwards;
  }
}

//checkout info item animations
@keyframes checkout-info-anim-in {
  0% {
    width: 0;
    
    transform: translateX(-30px);
    
    opacity: 0;
    visibility: hidden;
  }
  
  1% {
    width: 100%;
    
    transform: translateX(-30px);
    
    opacity: 0;
    visibility: visible;
  }
  
  100% {
    width: 100%;
    
    transform: translateX(0);
    
    opacity: 1;
    visibility: visible;
  }
}

@keyframes checkout-info-anim-out {
  0% {
    opacity: 1;
  }
  
  100% {
    opacity: 0;
  }
}

.checkout__info-item {
  
  //animated styles
  &.js-animated-in {
    width: 0;
    
    transform: translateX(-30px);
    
    opacity: 0;
    visibility: hidden;
    
    animation: checkout-info-anim-in .3s ease-out 0s forwards;
  }
  
  &.js-animated-out {
    opacity: 1;
    
    animation: checkout-info-anim-out .2s ease-out 0s forwards;
  }
}

//checkout form blocks animations
@keyframes checkout-form-anim-in {
  0% {
    width: 0;
    
    transform: translateY(-30px);
    
    opacity: 0;
    visibility: hidden;
  }
  
  1% {
    width: 100%;
    
    transform: translateY(-30px);
    
    opacity: 0;
    visibility: visible;
  }
  
  85% {
    width: 100%;
    
    transform: translateY(20px);
    
    opacity: 1;
    visibility: visible;
  }
  
  100% {
    width: 100%;
    
    transform: translateY(0);
    
    opacity: 1;
    visibility: visible;
  }
}

@keyframes checkout-form-anim-out {
  0% {
    opacity: 1;
  }
  
  100% {
    opacity: 0;
  }
}

.checkout__form-block--animated {
  
  //animated styles
  &.js-animated-in {
    width: 0;
    
    transform: translateY(-30px);
    
    opacity: 0;
    visibility: hidden;
    
    animation: checkout-form-anim-in .45s ease-out 0s forwards;
  }
  
  &.js-animated-out {
    opacity: 1;
    
    animation: checkout-form-anim-out .2s ease-out 0s forwards;
  }
} 

//close btn animation
@keyframes checkout-close-anim-in {
  
  0% {
    width: 0;
    
    transform: translate(0,100%);
    
    opacity: 0;
    visibility: hidden;
  }
  
  1% {
    width: $close-btn-dimensions;
    
    transform: translate(0,100%);
    
    opacity: 1;
    visibility: visible;
  }
  
  100% {
    width: $close-btn-dimensions;
    
    transform: translate(0,0);
    
    opacity: 1;
    visibility: visible;
  }
  
}

@keyframes checkout-close-anim-out {
  
  0% {
    transform: translate(0,0);
  }
  
  
  100% {
    transform: translate(0,100%);
  }
  
}

#close-btn {
  
  //animated styles
  &.js-animated-in {
    width: 0;
    
    transition-duration: 0s;
    transform: translate(0,100%);
    
    opacity: 0;
    visibility: hidden;
    
    animation: checkout-close-anim-in .15s ease-out 0s forwards;
  }
  
  &.js-animated-out {
    transform: translate(0,0);
    
    animation: checkout-close-anim-out .15s ease-out 0s forwards;
  }
}


            
          
!
            
              //*** form ux code

//check if input is empty or not
function _inputState (input) {
  
  if (input.value === '') {
      
    return false;
     
  } else {
    
    return true;
    
  }
  
};

// inputs/labels effects onblur/onclick
var inputsArray = document.querySelectorAll('.checkout__form-input'); 

inputsArray.forEach(function(elem) {
  
  //focus listener
  elem.addEventListener('focus', function() {
    
    var self = this,
        selfLabel = self.parentNode.querySelector('.checkout__form-label');
    
    self.classList.add('js-focus');
    selfLabel.classList.add('js-focus');
    
  });
  
  //blur listener
  elem.addEventListener('blur', function() {
    
    var self = this,
        selfLabel = self.parentNode.querySelector('.checkout__form-label'),
        payNowbtn = document.getElementById('pay-now');
    
    //check if current input is empty or not
    var selfState = _inputState(self);
    
    if (! selfState) {
      self.classList.remove('js-focus');
      selfLabel.classList.remove('js-focus');
    }
    
    //check if there are empty inputs
    var fullInputs = 0,
        allInputs = 0;
    
    inputsArray.forEach(function(elem) {
      
      allInputs += 1;
      
      var inputStates = _inputState(elem);
      
      if (inputStates) {
        fullInputs += 1;
      }
      
      if (allInputs === fullInputs) {
        //removing disable class from Pay Now btn if there are no empty inputs
        payNowbtn.classList.remove('btn--disabled');
      } else {
        //add disable class to Pay Now btn if there is empty input
        payNowbtn.classList.add('btn--disabled');
      }
      
    });
    
  });
  
  
});

//*** form opening ux

var checkoutBtn = document.getElementById('checkout-btn'),
    cartBlock = document.querySelector('.cart'),
    checkoutBlock = document.querySelector('.checkout'),
    checkoutInfoItem = document.querySelectorAll('.checkout__info-item'),
    checkoutFormItem = document.querySelectorAll('.checkout__form-block--animated'),
    closeBtn = document.getElementById('close-btn');

//helper function for animating multiple elements at a time
function _multipleAnimate(array, singleElemDelay, classToAdd, classToRemove) {
  
  var elemDelay = 0;
  
  array.forEach(function(elem, elemIndex) {
    
    if(elemIndex > 0) {
      elemDelay += singleElemDelay;
    }
    
    setTimeout(function() {
          
      elem.classList.add(classToAdd);

      elem.classList.remove(classToRemove);

    }, elemDelay)
    
  });
  
}

//checkout btn event handler (form appearing)
checkoutBtn.addEventListener('click', function() {
  
  // Hide 'Checkout' Button
  
  checkoutBtn.classList.add('js-animated-out');
  
  setTimeout(function() {
    
    checkoutBtn.classList.add('js-hidden');
    
  }, 500);
  
  setTimeout(function() {
    
    checkoutBtn.classList.remove('js-animated-out');
    
  }, 550);
  
  // Open checkout block
  
  var cartHeight = cartBlock.offsetHeight;
  
  checkoutBlock.style.height = cartHeight + 'px';
  
  cartBlock.style.height = cartHeight + 'px';
  
  setTimeout(function() {

    checkoutBlock.classList.remove('js-hidden');

    checkoutBlock.classList.add('js-animated-in');

  }, 600);

  setTimeout(function() {

    checkoutBlock.classList.remove('js-animated-in');

  }, 1100);
  
  // Reveal checkout block elements
  
    //reveal checkout info
    setTimeout(function() {
      
      _multipleAnimate(checkoutInfoItem, 150, 'js-animated-in', 'js-hidden');
      
    }, 1250);
  
    setTimeout(function() {
      
      checkoutInfoItem.forEach(function(elem) {
        elem.classList.remove('js-animated-in');
      })

    }, 2000);
  
    //reveal checkout form
    setTimeout(function() {
      
      _multipleAnimate(checkoutFormItem, 250, 'js-animated-in', 'js-hidden');
      
    }, 1600);
  
    setTimeout(function() {
      
      checkoutFormItem.forEach(function(elem) {
        elem.classList.remove('js-animated-in');
      })

    }, 3500);
  
  //Reveal 'close' button
  setTimeout(function() {
    
    closeBtn.classList.remove('js-hidden');
    
    closeBtn.classList.add('js-animated-in');
    
  }, 1750);
  
  setTimeout(function() {
    
    closeBtn.classList.remove('js-animated-in');
    
  }, 2650);
  
});

//*** form closing ux

//close btn event handler
closeBtn.addEventListener('click', function() {
  
  // Hide 'Close' Button
  closeBtn.classList.add('js-animated-out');
  
  setTimeout(function() {
    
    closeBtn.classList.add('js-hidden');
    
  }, 300);
  
  setTimeout(function() {
    
    closeBtn.classList.remove('js-animated-out');
    
  }, 650);
  
  // Hide Checkout block content
  setTimeout(function() {
    
    _multipleAnimate(checkoutInfoItem, 0, 'js-animated-out', 'none');
    
    _multipleAnimate(checkoutFormItem, 0, 'js-animated-out', 'none');

  }, 400);

  setTimeout(function() {
    
    checkoutInfoItem.forEach(function(elem) {
      elem.classList.add('js-hidden');

      elem.classList.remove('js-animated-out');
      
    });
    
    checkoutFormItem.forEach(function(elem) {
      elem.classList.add('js-hidden');

      elem.classList.remove('js-animated-out');
      
    });

  }, 1500);
  
  // Hide Checkout block
  setTimeout(function() {
    
    checkoutBlock.classList.add('js-animated-out');

  }, 850);

  setTimeout(function() {
    
    checkoutBlock.classList.add('js-hidden');

    checkoutBlock.classList.remove('js-animated-out');

  }, 1550);
  
  // Reveal Checkout btn
  setTimeout(function() {
    
    checkoutBtn.classList.remove('js-hidden');
    
    checkoutBtn.classList.add('js-animated-in');
    
  }, 1150);
  
  setTimeout(function() {
    
    checkoutBtn.classList.remove('js-animated-in');
    
  }, 1850);
  
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console