"kalkulator mobile"
Bootstrap 3.1.0 Snippet by interdeal

<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">Kwota pożyczki</h4> <span>Maksymalna kwota 10,000 PLN</span> <div class="col-sm-12"> <div id="slider_amirol"></div> </div> </div> <div class="price-slider"> <h4 class="great">Na jaki okres?</h4> <span>Proszę wybrać jeden</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 month active-month selected-month" id='24month'>24 Miesiące</button> </div> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block month" id='18month'>12 Miesięcy</button> </div> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-primary btn-lg btn-block month" id='12month'>30 Dni</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"> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-sm-6"> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-sm-6"> </div> <div class="col-sm-6"> <input type="hidden" id="amount_amirol" class="form-control"> <!-- <p class="price lead" id="total52"></p> --> </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">Wyślij wniosek <span class="glyphicon glyphicon-chevron-right"></span></button> </div> </div> <div class="form-group"> <div class="col-sm-12"> <span>Pożyczki na okres od 1 do 24 miesięcy. RRSO 0% do Max 1971%. Reprezentatywny przykład: Rzeczywista Roczna Stopa Oprocentowania (RRSO) wynosi 510,4%, całkowita kwota pożyczki 1000 zł, całkowita kwota do zapłaty 1341,70 zł, w tym: prowizja 325 zł, odsetki 16,70 zł), czas obowiązywania umowy: 3 miesiące.</span> </div> </div> </div> </form> </div> </div> </div> </div> <div class="price-slider"> <input name="sliderVal" type="hidden" id="sliderVal" value='0' readonly="readonly" /> <input name="month" type="hidden" id="month" value='24month' readonly="readonly" /> <input name="term" type="hidden" id="term" value='quarterly' readonly="readonly" /> <div class="btn-group btn-group-justified"> <div class="btn-group btn-group-lg"> </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; border-radius: 10px; padding: 0px 15px; /*width: 500px;*/ } .ui-widget-content { border: 1px solid #bdc3c7; 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: 50px; color: #FFFFFF; font-size: 20px; } .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; opacity: 0.5; } .price-slider { margin-bottom: 70px; } .price-slider span { font-weight: 200; display: inline-block; color: #7f8c8d; font-size: 13px; } .form-pricing { padding: 20px; border-radius: 4px; } .price-form { 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; }
// JavaScript Document var p = { 0: "100 PLN", 1: "200 PLN", 2: "300 PLN", 3: "400 PLN", 4: "500 PLN", 5: "600 PLN", 6: "700 PLN", 7: "800 PLN", 8: "900 PLN", 9: "1000 PLN", 10: "1,100 PLN", 11: "1,200 PLN", 12: "1,300 PLN", 13: "1,400 PLN", 14: "1,500 PLN", 15: "1,600 PLN", 16: "1,700 PLN", 17: "1,800 PLN", 18: "1,900 PLN", 19: "2,000 PLN", 20: "2,100 PLN", 21: "2,200 PLN", 22: "2,300 PLN", 23: "2,400 PLN", 24: "2,500 PLN", 25: "2,600 PLN", 26: "2,700 PLN", 27: "2,800 PLN", 28: "2,900 PLN", 29: "3,000 PLN", 30: "3,500 PLN", 31: "4,000 PLN", 32: "4,500 PLN", 33: "5,000 PLN", 34: "5,500 PLN", 35: "6,000 PLN", 36: "6,500 PLN", 37: "7,000 PLN", 38: "7,500 PLN", 39: "8,000 PLN", 40: "8,500 PLN", 41: "9,000 PLN", 42: "9,500 PLN", 43: "10,000 PLN", 44: "11,000 PLN", 45: "12,000 PLN", 46: "13,000 PLN", }; var t = { 0: "100", 1: "200", 2: "300", 3: "400", 4: "500", 5: "600", 6: "700", 7: "800", 8: "900", 9: "1000", 10: "1100", 11: "1200", 12: "1300", 13: "1400", 14: "1500", 15: "1600", 16: "1700", 17: "1800", 18: "1900", 19: "2000", 20: "2100", 21: "2200", 22: "2300", 23: "2400", 24: "2500", 25: "2600", 26: "2700", 27: "2800", 28: "2900", 29: "3000", 30: "3500", 31: "4000", 32: "4500", 33: "5000", 34: "5500", 35: "6000", 36: "6500", 37: "7000", 38: "7500", 39: "8000", 40: "8500", 41: "9000", 42: "9500", 43: "10000", 44: "11000", 45: "12000", 46: "13000", } var obj = { '24month' : { 'quarterly' : '1.41', 'monthly' : '1.28', 'weekly' : '1.2' }, '18month' : { 'quarterly' : '1.38', 'monthly' : '1.25', 'weekly' : '1.8' }, '12month' : { 'quarterly' : '1.35', 'monthly' : '1.225', 'weekly' : '1.15' } }; $(document).ready(function() { $("#total").val("10000"); $("#slider_amirol").slider({ range: "min", animate: true, min: 0, max: 43, step: 1, slide: function(event, ui) { update(1,ui.value); //changed calcualtePrice(ui.value); } }); $('.month').on('click',function(event) { var id = $(this).attr('id'); $('.month').removeClass('selected-month'); $(this).addClass('selected-month'); $(".month").removeClass("active-month"); $(this).addClass("active-month"); $('#month').val(id); calcualtePrice() }); $('.term').on('click',function(event) { var id = $(this).attr('id'); $('.term').removeClass('selected-term'); $(this).addClass('selected-term'); $(".term").removeClass("active-term"); $(this).addClass("active-term"); $('#term').val(id); calcualtePrice() }); 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 = $('#sliderVal').val(); var month = $('#month').val(); var term = obj[month][$('#term').val()]; var totalPrice = t[val]*term; $("#total").val(totalPrice.toFixed(2)); }

Related: See More


Questions / Comments: