"Bootstrap Loan Calculator"
Bootstrap 3.1.0 Snippet by nyamdavaa

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="price-box"> <div class="row"> <div class="col-sm-12"> <div class="price-slider"> <h4 class="great">Subscribers</h4> <div class="col-sm-12"> <div id="slider_amirol"></div> </div> </div> </div> <div class="col-sm-3"></div> <div class="col-sm-6"> <div class="col-sm-12"> <div class="price-form"> <table class="table table-striped table-borderless results large" style="opacity: 1;"> <tbody> <tr data-results-service-key="emailvolume" class="emailvolume"> <td class="service col-md-8"><strong>EmailVolume + Amazon SES</strong></td> <td class="price text-center col-md-4" id="price_emailvolume">€0.00</td> </tr> <tr data-results-service-key="sarbacane" class="sarbacane"> <td class="service col-md-8">Sarbacane</td> <td class="price text-center col-md-4" id="price_sar">€0.00</td> </tr> <tr data-results-service-key="mailchimp" class="mailchimp"> <td class="service col-md-8">Mailchimp</td> <td class="price text-center col-md-4" id="price_mailchimp">€0.00</td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"></div> </div> </div> </div> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
body { padding-top: 60px; } .price-box { margin: 0 auto; background: #E9E9E9; border-radius: 10px; padding: 40px 15px; /*width: 500px;*/ } .ui-widget-content { border: 1px solid #bdc3c7; background: #e1e1e1; color: #222222; margin-top: 4px; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 7.2em; height: 2.7em; cursor: default; margin: 0 -40px auto !important; text-align: center; line-height: 30px; color: #FFFFFF; font-size: 12px; } .ui-slider .ui-slider-handle .glyphicon { color: #FFFFFF; margin: 0 1px; font-size: 11px; opacity: 0.7; } .ui-corner-all { border-radius: 20px; } .ui-slider-horizontal .ui-slider-handle { top: -.9em; } .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #f9f9f9; background: #3498db; } .ui-slider-horizontal .ui-slider-handle { margin-left: -0.5em; } .ui-slider .ui-slider-handle { cursor: pointer; } .ui-slider a, .ui-slider a:focus { cursor: pointer; outline: none; } .price, .lead p { font-weight: 600; font-size: 20px; display: inline-block; line-height: 30px; border:0; } h4.great { background: #00ac98; margin: 0 0 25px -60px; padding: 7px 15px; color: #ffffff; font-size: 18px; font-weight: 600; border-radius: 5px; display: inline-block; -moz-box-shadow: 2px 4px 5px 0 #ccc; -webkit-box-shadow: 2px 4px 5px 0 #ccc; box-shadow: 2px 4px 5px 0 #ccc; } .total { border-bottom: 1px solid #7f8c8d; /*display: inline; padding: 10px 5px;*/ position: relative; padding-bottom: 20px; } .total:before { content: ""; display: inline; position: absolute; left: 0; bottom: 5px; width: 100%; height: 3px; background: #7f8c8d; opacity: 0.5; } .price-slider { margin-bottom: 30px; } .price-slider span { font-weight: 200; display: inline-block; color: #7f8c8d; font-size: 13px; } .form-pricing { background: #ffffff; padding: 20px; border-radius: 4px; } .price-form { background: #ffffff; margin-bottom: 10px; padding: 20px; border: 1px solid #eeeeee; border-radius: 4px; /*-moz-box-shadow: 0 5px 5px 0 #ccc; -webkit-box-shadow: 0 5px 5px 0 #ccc; box-shadow: 0 5px 5px 0 #ccc;*/ } .form-group { margin-bottom: 0; } .form-group span.price { font-weight: 200; display: inline-block; color: #7f8c8d; font-size: 14px; } .help-text { display: block; margin-top: -10px; margin-bottom: 10px; color: #737373; /*position: absolute;*/ /*margin-left: 20px;*/ font-weight: 200; /*text-align: right;*/ width: 188px; } .price-form label { font-weight: 200; font-size: 21px; } .service { font-weight: 200; font-size: 19px; } img.payment { display: block; margin-left: auto; margin-right: auto } .ui-slider-range-min { background: #2980b9; } .active-month, .active-term { background: #3276b1; } /* HR */ hr.style { margin-top: 0; border: 0; border-bottom: 1px dashed #ccc; background: #999; }
// JavaScript Document var p = { 0: "0", 1: "5,000 subscribers", 2: "7,500 subscribers", 3: "10,000 subscribers", 4: "15,000 subscribers", 5: "20,000 subscribers", 6: "25,000 subscribers", 7: "30,000 subscribers", 8: "35,000 subscribers", 9: "50,000 subscribers", 10: "60,000 subscribers", 11: "75,000 subscribers", 12: "100,000 subscribers", 13: "125,000 subscribers", 14: "150,000 subscribers", 15: "175,000 subscribers", 16: "200,000 subscribers", 17: "225,000 subscribers", 18: "250,000 subscribers" }; var t = { 0: "0", 1: "5000", 2: "7500", 3: "10000", 4: "15000", 5: "20000", 6: "25000", 7: "30000", 8: "35000", 9: "50000", 10: "60000", 11: "75000", 12: "100000", 13: "125000", 14: "150000", 15: "175000", 16: "200000", 17: "225000", 18: "250000" } var emailvolume = { 0: "0", 1: "15", 2: "15", 3: "50", 4: "50", 5: "50", 6: "50", 7: "50", 8: "50", 9: "50", 10: "50", 11: "50", 12: "50", 13: "95", 14: "95", 15: "95", 16: "95", 17: "95", 18: "95" } var sarbacane = { 0: "0", 1: "69", 2: "+69", 3: "95", 4: "+95", 5: "+95", 6: "129", 7: "+129", 8: "+129", 9: "169", 10: "+169", 11: "+169", 12: "229", 13: "null", 14: "null", 15: "null", 16: "null", 17: "null", 18: "null" } var mailchimp = { 0: "0", 1: "47.82", 2: "71.73", 3: "76.51", 4: "143.45", 5: "148.23", 6: "153.02", 7: "200.83", 8: "229.52", 9: "310.81", 10: "334.72", 11: "358.63", 12: "454.26", 13: "573.81", 14: "645.53", 15: "788.98", 16: "836.80", 17: "956.34", 18: "1051.98" } $(document).ready(function() { $("#slider_amirol").slider({ range: "min", animate: true, min: 0, max: 18, step: 1, slide: function(event, ui) { update(1,ui.value); //changed calcualtePrice(ui.value); } }); update(); calcualtePrice(); }); function update(slider,val) { if(undefined === val) val = 0; var amount = p[val]; $('#sliderVal').val(val); $('#slider_amirol a').html('<label><span class="glyphicon glyphicon-chevron-left"></span> '+amount+' <span class="glyphicon glyphicon-chevron-right"></span></label>'); } function calcualtePrice(val){ if(undefined === val) val = 0; var totalPrice = t[val]; $("#price_emailvolume").text("€ "+ emailvolume[val]); if(sarbacane[val] != "null") $("#price_sar").text("€ "+Math.round((sarbacane[val])).toFixed(2)); else { $("#price_sar").text("€ " + Math.round(sarbacane['12'])); $("#price_sar").css("text-decoration",'line-through' ); } $("#price_mailchimp").text("€ "+Math.round((mailchimp[val])).toFixed(2)); }

Related: See More


Questions / Comments: