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.

            
              <link href="https://fonts.googleapis.com/css?family=Open+Sans:300i,300,400,400i,600,700" rel="stylesheet">
<section class="white-bg" id="roi-container">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <div id="roi-calculator">
                    <div class="row">
                        <div class="col-sm-12">
                            <h1 class="text-center">How much can App save you?</h1>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <h2><div class="roi-steps">
                            <span class="progressing">20%</span>
                            <span class="step active"></span>
                            <span class="step"></span>
                            <span class="step"></span>
                            <span class="step"></span>
                            <span class="step"></span>
                        </div> 1. Select your costs</h2>
                    <hr/>
                    <div class="row">
                        <div class="col-sm-5">
                            <label for="averageChargeRate">Your average <strong>charge rate</strong> per hour</label>
                            <div class="input-group rates">
                                <span class="input-group-addon">$</span>
                                <input type="text" class="form-control" id="averageChargeRate"
                                       aria-describedby="basic-addon1" value="75.00">
                            </div>
                            <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='75' class='fill'
                                   min="10" max="200" step="0.5" id="averageChargeSlider"/>
                        </div>
                        <div class="col-sm-2"></div>
                        <div class="col-sm-5">
                            <label for="averageWageRate">Your average <strong>wage rate</strong> per hour</label>
                            <div class="input-group rates">
                                <span class="input-group-addon">$</span>
                                <input type="text" class="form-control" id="averageWageRate"
                                       aria-describedby="basic-addon1" value="45.00">
                            </div>
                            <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='45' class='fill'
                                   min="10" max="200" step="0.5" id="averageWageSlider"/>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-12 text-right" style="margin:40px 0">
                            <a class="btn-cta nextStep-js" id="stepNext1" data-step-id="#step2" href="#totalCost">Next Step &rsaquo;</a>
                        </div>
                    </div>
                    <div class="row" id="totalCost" style="display:none">
                        <br/>
                        <br/>
                        <div class="col-sm-12 text-center"><h1>Your total costs</h1>
                            <br/>
                            <h2>
                                $<span id="totalCostText"></span> per hour
                            </h2>
                        </div>
                    </div>
                    <div id="step2" style="display:none">
                        <br/>
                        <br/>
                        <br/>
                        <h2><div class="roi-steps">
                                <span class="progressing">40%</span>
                                <span class="step active"></span>
                                <span class="step active"></span>
                                <span class="step"></span>
                                <span class="step"></span>
                                <span class="step"></span>
                            </div>2. Calculate your time gains</h2>
                        <hr/>
                        <div class="row">
                            <div class="col-sm-5">
                                <label for="savedHours">By using our reports to improve timesheet accuracy, how many
                                    hours might you save?</label>

                                <div class="input-group hourlyRates">
                                    <input type="text" class="form-control" id="savedHours"
                                           aria-describedby="basic-addon1" value="2.5">
                                    <span class="input-group-addon">hours / month</span>
                                </div>
                                <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='2.5'
                                       class='fill' min="1" max="20" step="0.5" id="savedHoursSlider"/>
                            </div>
                            <div class="col-sm-2"></div>
                            <div class="col-sm-5">
                                <label for="billableHours">By having full visibility of your fleet, how many extra
                                    billable hours are you able to gain?</label>
                                <div class="input-group hourlyRates">
                                    <input type="text" class="form-control" id="billableHours"
                                           aria-describedby="basic-addon1" value="5.0">
                                    <span class="input-group-addon">hours / month</span>
                                </div>
                                <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='5' class='fill'
                                       min="1" max="20" step="0.5" id="billableHoursSlider"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 text-right" style="margin:40px 0">
                                <a class="btn-cta nextStep-js" id="stepNext2" data-step-id="#step3" href="#totalGain">Next Step &rsaquo;</a>
                            </div>
                        </div>
                        <div class="row" id="totalGain" style="display:none">
                            <br/>
                            <br/>
                            <div class="col-sm-12 text-center"><h1>Your total gain</h1>
                                <br/>
                                <h2>
                                    <span id="totalGainText"></span> hours per month
                                </h2>
                            </div>
                        </div>
                    </div>
                    <div id="step3" style="display:none">
                        <br/>
                        <br/>
                        <h2><div class="roi-steps">
                                <span class="progressing">60%</span>
                                <span class="step active"></span>
                                <span class="step active"></span>
                                <span class="step active"></span>
                                <span class="step"></span>
                                <span class="step"></span>
                            </div>3. Calculate your kilometre gains</h2>
                        <hr/>
                        <div class="row">
                            <div class="col-sm-5">
                                <label for="savedHours">How many kilometres might you save each month, through better
                                    job planning and less personal use?
                                </label>

                                <div class="input-group kilometerGains hourlyRates">
                                    <input type="text" class="form-control" id="kilometerGains"
                                           aria-describedby="basic-addon1" value="50">
                                    <span class="input-group-addon">km / month</span>
                                </div>
                                <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='50'
                                       class='fill' min="50" max="1000" step="50" id="kilometerGainsSlider"/>
                            </div>
                            <div class="col-sm-2"></div>
                            <div class="col-sm-5">
                                <label for="kilometerCosts">Please select approximately how much a kilometre of travel costs your business.</label>
                                <div class="input-group hourlyRates">
                                    <input type="text" class="form-control" id="kilometerCosts"
                                           aria-describedby="basic-addon1" value="1">
                                    <span class="input-group-addon">$ / per km</span>
                                </div>
                                <input type='range' class="rangeSlider" data-idx='9' data-prev='' value='1' class='fill'
                                       min="1" max="5" step="0.5" id="kilometerCostsSlider"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 text-right" style="margin:40px 0">
                                <a class="btn-cta nextStep-js" id="stepNext3" data-step-id="#step4" href="#kilometerCostsSlider">Next Step &rsaquo;</a>
                            </div>
                        </div>
                        <div class="row" id="totalKilometers" style="display:none">
                            <br/>
                            <br/>
                            <div class="col-sm-12 text-center"><h1>Your reduced kilometre value</h1>
                                <br/>
                                <h2>
                                    $<span id="totalKilometerText"></span>
                                </h2>
                            </div>
                        </div>

                        <div id="step4" style="display:none;">

                            <div id="selectVehicles" style="">
                                <br/>
                                <br/>
                                <h2><div class="roi-steps">
                                        <span class="progressing">80%</span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step"></span>
                                    </div>4. How many vehicles are in your fleet?</h2>
                                <hr/>
                                <br/>
                                <br/>
                                <div class="visibleVans-js">
                                    <div class="row summary ">
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive first active" data-count="1">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="2">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="3">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="4">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="5">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="6">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="7">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="8">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="9">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="10">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="11">
                                            </div>
                                                                                    <div class="col-sm-1 col-xs-6 van-js">
                                                <img src="http://simprogroup.com/assets/img/delivery_van.png" alt="Delivery Van" class="delivery-van img-responsive " data-count="12">
                                            </div>
                                                                            </div>
                                    <div class="row">
                                        <div class="col-sm-12 col-xs-12 text-center" style="margin: 40px 0">
                                            <a class="moreVans-js">I have more than 12 vehicles</a>
                                        </div>
                                    </div>                                   
                                </div>
                                <div class="row" id="moreVansContainer" style="display:none">
                                    <div class="col-sm-3">
                                        <h2>I have a fleet of ...</h2>
                                    </div>
                                    <div class="col-sm-9">
                                        <div class="input-group hourlyRates" style="width:150px;margin:0">
                                            <input type="number" value="" class="form-control amountVans-js" name="vans"/>
                                            <span class="input-group-addon">vehicles</span>
                                        </div>
                                    </div>
                                </div>
                                <br/>
                                <br/>
                            </div>
                            <div class="row">
                                <div class="col-sm-12 text-center">
                                    <a class="btn-cta" id="calculateROI" href="#totalNumbers">Calculate your savings &rsaquo;</a>
                                </div>
                            </div>
                        </div>
                        <div id="step5" style="display:none">

                            <div id="roiReturns" style="display: none">
                                <br/>
                                <br/>
                                <h2><div class="roi-steps">
                                        <span class="progressing">100%</span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                        <span class="step active"></span>
                                    </div>5. Your returns</h2>
                                <hr/>
                                <div class="row summary">
                                    <div class="col-sm-3 text-center">
                                        <h1>Total cost</h1>
                                        <h2>$<span class="totalGainCost"></span> per hour</h2>
                                    </div>
                                    <div class="col-sm-1 text-center">
                                        <h1>x</h1>
                                    </div>
                                    <div class="col-sm-3 text-center">
                                        <h1>Total time gain</h1>
                                        <h2><span class="totalGainHoursMonth"></span> hours per month</h2>
                                    </div>
                                    <div class="col-sm-1 text-center">
                                        <h1>+</h1>
                                    </div>
                                    <div class="col-sm-4 text-center">
                                        <h1>Reduced kilometre value</h1>
                                        <h2>$<span class="totalGainKilometersMonth"></span> per month</h2>
                                    </div>
                                </div>
                                <div class="row summary" id="totalNumbers">
                                    <div class="col-sm-12 text-center">
                                        <h1>x</h1>
                                        <br/>
                                        <h1>Number of vehicles</h1>
                                        <h2><span class="numberVehicles"></span> vehicles</h2>
                                    </div>
                                </div>
                                <div class="row summary" style="margin-top:30px">
                                    <div class="col-sm-12 text-center totalNumbers">
                                        <h1>Total return on investment per month</h1>
                                        <h2 style="font-size: 33px">$<span class="totalROIMonth"></span> per month</h2>
                                        <a href="#service-signup" class="btn btn-cta">Get started ›</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
</section>
            
          
!
            
              body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-size: 28px
}
h2 {
  font-size: 20px
}
    section.white-bg#roi-container {
        background: linear-gradient(20deg, #20c4f4 0, #115ea2 70%, #115ea2 100%);
      padding: 60px 0
    }
    .moreVans-js {
        cursor: pointer;
        color: #20C4F3;
        text-decoration: underline;
    }
    .delivery-van {
        -webkit-filter: saturate(0) brightness(2);
        filter: saturate(0) brightness(2);
        transition: ease-in-out all .2s;
        cursor: pointer;
    }

    .delivery-van:hover,
    .delivery-van.active {
        -webkit-filter: saturate(1) brightness(1) contrast(1.2) drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
        filter: saturate(1) brightness(1) contrast(1.2);
    }
    .delivery-van.active:hover{
        -webkit-filter: saturate(0) brightness(2);
        filter: saturate(0) brightness(2);
    }
#roi-calculator {
  width: 70%;
  margin: auto;
}
    #roi-calculator a.btn-cta {
        color: #FFF;
        font-size: 17px;
        text-transform: uppercase;
        font-size: 15px;
        letter-spacing: 3px;
        font-weight: normal;
        padding: 10px 20px;
        cursor: pointer;
        transition: ease-in-out all .2s;
    }
    #roi-calculator a.btn-cta:hover {
        background: #000
    }

    #roi-calculator .totalNumbers {
        border: 1px dashed rgb(17, 94, 162);
        border-radius: 4px;
        padding: 20px;
        background: #FFF;
    }

    #roi-calculator .totalNumbers h1,
    #roi-calculator .totalNumbers h2 {
        color: #000;
        font-weight: bold;
    }

    #roi-calculator .summary {
        font-size: 17px
    }

    #roi-calculator {
        color: #FFF;
    }

    #roi-calculator hr {
        border-top: 1px solid rgba(0, 0, 0, 0.2)
    }

    #roi-calculator input,
    #roi-calculator .input-group-addon {
        box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
        border: none;
    }

    #roi-calculator .input-group-addon {
        background: #115ea2;
        color: #FFF;
        font-size: 12px;
    }

    #roi-calculator h1,
    #roi-calculator h2,
    #roi-calculator label {
        color: #FFF;
    }

    #roi-calculator .rates {
        width: 150px;
        margin: 20px auto;
    }

    #roi-calculator .hourlyRates {
        width: 200px;
        margin: 20px auto;
    }

    #roi-calculator input.rangeSlider {
        width: 100%;
        padding: 1px 13px;
        background: #115ea2;
        border-radius: 0;
        -webkit-appearance: none;
        font-size: 14px;
        color: #9da6b9;
        border: none;
        border-radius: 4px;
        box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.2);
    }

    #roi-calculator button {
        background: #46bb86;
        border-radius: 2px;
        color: #FFF;
        text-align: center;
        font-family: OpenSansbold, sans-serif;
        font-weight: 400;
        text-transform: uppercase;
        font-size: 18px;
        letter-spacing: 2px;
        border: none;
        padding: 15px 40px;
        width: 100%;
        margin-top: 30px;
        transition: all ease-in .2s;
        -webkit-font-smoothing: antialiased;
    }

    .roi-steps {
        display: inline-block;
        background: rgba(0,0,0,0.2);
        width: 100px;
        overflow: hidden;
        height: 20px;
        float: right;
        padding: 2px;
        position: relative
    }
    .step {
        width: 20%;
        float: left;
    }
    .step.active {
        background: #46bb86;
        height: 100%;
        border-right: 2px solid transparent;
    }
    span.progressing{
        position: absolute;
        top: 4px;
        right: 5px;
        font-size: 11px;
        color: #FFF;
        text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
        font-weight: bold;
        letter-spacing: 1px;
    }
a.btn-cta {
    font-size: 13px;
    background: #46bb86;
    border-radius: 2px;
    padding: 2px 10px;
    transition: all ease-in .2s;
    border: none;
    box-shadow: none;
}

            
          
!
            
              
    $('.moreVans-js').on('click', function() {
        $(this).fadeOut();
        $('.visibleVans-js').fadeOut();
        $('#moreVansContainer').fadeIn();
    });
    $('#calculateROI').on('click', function () {
        $(this).text('Update your calculations');
        var kilometerCost = $('#kilometerCosts').val();
        var kilometerGains = $('#kilometerGains').val();
        console.log(kilometerCost);
        totalCosts = (totalCost * totalGain) + (+kilometerCost * +kilometerGains);


        //calculate vehicle costs
        if($('.amountVans-js').val() > 0){
            deliveryVanIndex = $('.amountVans-js').val();
        }else {
            deliveryVanIndex = 0;
            $('.delivery-van.active').each(function () {
                deliveryVanIndex++;
            });
        }
        totalCosts = totalCosts * +deliveryVanIndex;
        $('.totalROIMonth').text(Math.round(totalCosts));
        $('.numberVehicles').text(deliveryVanIndex);
        $('#roiReturns, #step5').fadeIn();
    });

    $('.delivery-van:not(.first)').on('click', function () {
        $(this).toggleClass('active');
        var count = parseInt($(this).data('count'));
        if($(this).hasClass('active')){

            $('.delivery-van').filter(function(){
                if(parseInt($(this).data('count')) < count){
                    $(this).addClass('active');
                }
            });
        }else{
            $('.delivery-van').filter(function(){
                if(parseInt($(this).data('count')) >= count){
                    $(this).removeClass('active');
                }
            });
        }
    });
    $('.nextStep-js').on('click', function () {
        $(this).fadeOut();
        $($(this).data('step-id')).slideDown();
        if($(this).data('step-id') == '#step2') {
            totalCost = +$('#averageChargeRate').val() + +$('#averageWageRate').val();
            $('#totalCostText, .totalGainCost').text(totalCost);
            $('#totalCost').fadeIn();
        }else if($(this).data('step-id') == '#step3'){
            totalGain = +$('#savedHours').val() + +$('#billableHours').val();
            $('#totalGainText, .totalGainHoursMonth').text(totalGain);
            $('#totalGain').fadeIn();
        }else if($(this).data('step-id') == '#step4'){
            var kilometerCost = +$('#kilometerGains').val() * +$('#kilometerCosts').val();
            $('#totalKilometerText,.totalGainKilometersMonth').text(kilometerCost);
            $('#totalKilometers').fadeIn();
        }
    });
    $('#kilometerCostsSlider').on('change input', function () {
        $('#kilometerCosts').val($(this).val());
        var kilometerCost = +$('#kilometerGains').val() * +$('#kilometerCosts').val();
        $('#totalKilometerText,.totalGainKilometersMonth').text(kilometerCost);
        $('#totalKilometers, #step4').fadeIn();
        $('#stepNext3').fadeOut();
    });
    $('#kilometerGainsSlider').on('change input', function () {
        $('#kilometerGains').val($(this).val());
        var kilometerCost = +$('#kilometerGains').val() * +$('#kilometerCosts').val();
        $('#totalKilometerText,.totalGainKilometersMonth').text(kilometerCost);
        $('#totalKilometers, #step4').fadeIn();
        $('#stepNext3').fadeOut();
    });
    $('#averageChargeSlider').on('change input', function () {
        $('#averageChargeRate').val($(this).val());
        totalCost = +$('#averageChargeRate').val() + +$('#averageWageRate').val();
        $('#totalCostText, .totalGainCost').text(totalCost);
        $('#totalCost, #step2').fadeIn();
        $('#stepNext1').fadeOut();
    });
    $('#averageWageSlider').on('change input', function () {
        $('#averageWageRate').val($(this).val());
        totalCost = +$('#averageChargeRate').val() + +$('#averageWageRate').val();
        $('#totalCostText, .totalGainCost').text(totalCost);
        $('#totalCost, #step2').fadeIn();
        $('#stepNext1').fadeOut();
    });
    $('#savedHoursSlider').on('change input', function () {
        $('#savedHours').val($(this).val());
        totalGain = +$('#savedHours').val() + +$('#billableHours').val();
        $('#totalGainText, .totalGainHoursMonth').text(totalGain);
        $('#totalGain, #step3').fadeIn();
        $('#stepNext2').fadeOut();
    });
    $('#billableHoursSlider').on('change input', function () {
        $('#billableHours').val($(this).val());
        totalGain = +$('#savedHours').val() + +$('#billableHours').val();
        $('#totalGainText, .totalGainHoursMonth').text(totalGain);
        $('#totalGain, #step3').fadeIn();
        $('#stepNext2').fadeOut();
    });

            
          
!
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