"Bootstrap Business Loan Calculator"
Bootstrap 3.1.0 Snippet by SyKenneth

<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-6"> <form class="form-horizontal form-pricing" role="form"> <div class="price-slider"> <h4 class="great">Amount</h4> <span>Minimum Php 50,000 is required</span> <div class="col-sm-12"> <div id="slider_amirol3"></div> </div> </div> <div class="price-slider"> <h4 class="great">Duration</h4> <span>Please choose one</span> <div class="btn-group btn-group-justified"> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block month3 active-month selected-month" id='12'>12 Months</button> </div> </div> </div> <div class="price-slider"> <h4 class="great">Term</h4> <span>Please choose one</span> <input name="sliderVal" type="hidden" id="sliderVal3" value='0' readonly="readonly" /> <input name="month" type="hidden" id="month3" value='12' readonly="readonly" /> <input name="term" type="hidden" id="term3" value='semimonthly' readonly="readonly" /> <div class="btn-group btn-group-justified"> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block term3 active-term selected-term" id='semimonthly'>Semi-Monthly</button> </div> <!-- <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block term" id='monthly' disabled>Monthly</button> </div> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block term" id='weekly' disabled>Weekly</button> </div> --> </div> </div> </div> <div class="col-sm-6"> <div class="price-form"> <div class="form-group"> <div class="row"> <div class="col-sm-6"> <label for="amount_amirol" class="control-label">Interest (Php): </label> <span class="help-text">On top of borrowed amount</span> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> <!-- <p class="price lead" id="total"></p> --> <input class="price lead" name="totalprice" type="text" id="b_interest" disabled="disabled" style="" /> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-sm-6"> <label for="amount_amirol" class="control-label">Total Repayment (Php): </label> <span class="help-text">Amount that you need to pay</span> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> <!-- <p class="price lead" id="total"></p> --> <input class="price lead" name="totalprice" type="text" id="b_total" disabled="disabled" style="" /> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-sm-6"> <label for="amount_amirol" class="control-label">Monthly (Php): </label> <span class="help-text">Payable every Month</span> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> <!-- <p class="price lead" id="total12"></p> --> <input class="price lead" name="totalprice12" type="text" id="b_total12" disabled="disabled" style="" /> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-sm-6"> <label for="amount_amirol" class="control-label">Semi-Monthly (Php): </label> <span class="help-text">Payable every 2 weeks</span> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> <!-- <p class="price lead" id="total52"></p> --> <input class="price lead" name="totalprice52" type="text" id="b_total52" disabled="disabled" style="" /> </div> </div> </div> <div style="margin-top:30px"></div> <hr class="style"> <div class="form-group"> <div class="col-sm-12"> <button type="submit" class="btn btn-primary btn-lg btn-block">Apply Now <span class="glyphicon glyphicon-chevron-right"></span></button> <button type="submit" class="btn btn-success btn-lg btn-block">Client Login <span class="glyphicon glyphicon-chevron-right"></span></button> </div> </div> </div> </form> </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: 32px; display: inline-block; line-height: 60px; border:0; width: 245px; } 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: 70px; } .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; min-height: 520px; 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; } 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 p3 = { 0: "50K", 1: "100K", 2: "150K", 3: "200K", 4: "250K", 5: "300K", 6: "350K", 7: "400K", 8: "450K", 9: "500K", 10: "550K", 11: "600K", 12: "650K", 13: "700K", 14: "750K", 15: "800K", 16: "850K", 17: "900K", 18: "950K", 19: "1M", 20: "1.05M", 21: "1.1M", 22: "1.15M", 23: "1.2M", 24: "1.25M", 25: "1.3M", 26: "1.35M", 27: "1.4M", 28: "1.45M", 29: "1.5M", 30: "1.55M", 31: "1.6M", 32: "1.65M", 33: "1.7M", 34: "1.75M", 35: "1.8M", 36: "1.85M", 37: "1.9M", 38: "1.95M", 39: "2M", }; var t3 = { 0: "50000", 1: "100000", 2: "150000", 3: "200000", 4: "250000", 5: "300000", 6: "350000", 7: "400000", 8: "450000", 9: "500000", 10: "550000", 11: "600000", 12: "650000", 13: "700000", 14: "750000", 15: "800000", 16: "850000", 17: "900000", 18: "950000", 19: "1000000", 20: "1050000", 21: "1100000", 22: "1150000", 23: "1200000", 24: "1250000", 25: "1300000", 26: "1350000", 27: "1400000", 28: "1450000", 29: "1500000", 30: "1550000", 31: "1600000", 32: "1650000", 33: "1700000", 34: "1750000", 35: "1800000", 36: "1850000", 37: "1900000", 38: "1950000", 39: "2000000", } var obj3 = { '12' : { 'semimonthly' : '1.66', 'monthly' : '1.28', 'weekly' : '1.2' }, }; $(document).ready(function() { $("#b_total").val("50000"); $("#slider_amirol3").slider({ range: "min", animate: true, min: 0, max: 39, step: 1, slide: function(event, ui) { update3(1,ui.value); //changed calcualtePrice3(ui.value); } }); $('.month3').on('click',function(event) { var id = $(this).attr('id'); $('.month3').removeClass('selected-month'); $(this).addClass('selected-month'); $(".month3").removeClass("active-month"); $(this).addClass("active-month"); $('#month3').val(id); calcualtePrice3() }); $('.term3').on('click',function(event) { var id = $(this).attr('id'); $('.term3').removeClass('selected-term'); $(this).addClass('selected-term'); $(".term3").removeClass("active-term"); $(this).addClass("active-term"); $('#term3').val(id); calcualtePrice3() }); update3(); calcualtePrice3(); }); function update3(slider,val) { if(undefined === val) val = 0; var amount = p3[val]; $('#sliderVal3').val(val); $('#slider_amirol3 a').html('<label><span class="glyphicon glyphicon-chevron-left"></span> '+amount+' <span class="glyphicon glyphicon-chevron-right"></span></label>'); } function calcualtePrice3(val){ if(undefined === val) val = $('#sliderVal3').val(); var month = $('#month3').val(); var term = obj3[month][$('#term3').val()]; var totalPrice = t3[val]*term; $("#b_total").val(totalPrice.toFixed(2)); $("#b_total12").val(Math.round((totalPrice)/month).toFixed(2)); $("#b_total52").val(Math.round((totalPrice)/month/2).toFixed(2)); $("#b_interest").val((totalPrice.toFixed(2)-t3[val]).toFixed(2)); }

Related: See More


Questions / Comments: