cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="equity-calc">
  <div class="row range-slider-group">
    <div class="col-sm-2 col-xs-12">
      <div class="range-slider__label">
        <span>How much is your home worth?</span>
      </div>
    </div>
    <div class="col-sm-10 col-xs-12">
      <div class="control-group">
        <div class="range-slider">
          <input id="homeValue" class="range-slider__range green" type="range" value="250" min="20" max="999" />
        </div>
        <div class="range-slider__value">
          <span>$</span><span id="homeTag" class="value">250</span><span>K</span>
        </div>
      </div>
    </div>
  </div>
  <div class="row range-slider-group">
    <div class="col-sm-2 col-xs-12">
      <div class="range-slider__label">
        <span>How much do you owe?</span>
      </div>
    </div>
    <div class="col-sm-10 col-xs-12">
      <div class="control-group">
        <div class="range-slider">
          <input id="principalAmount" class="range-slider__range red" type="range" value="100" min="0" max="999" />
        </div>
        <div class="range-slider__value">
          <span>$</span><span id="principalTag" class="value">100</span><span>K</span>
        </div>
      </div>
    </div>
  </div>
  <div class="row approved-amount">
    <div class="col-lg-4 col-md-3 col-sm-3 col-xs-12">
      <div class="approved-amount__label">
        <span class="label">Borrow up to</span>
      </div>
    </div>
    <div class="col-lg-8 col-md-9 col-sm-9 col-xs-12">
      <div class="approved-amount__value">
        <span>$</span><span id="approvedAmount" class="value">0</span>
      </div>
    </div>
  </div>
</div>
            
          
!
            
              @-ms-viewport {
  width: device-width;
}

.row {
  margin-left: -15px;
  margin-right: -15px;
}
.col, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
  position: relative;
  min-height: 1px;
  padding-left: 15px;
  padding-right: 15px;
}
.col, .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
  float: left;
}
.col-xs-12 {
  width: 100%;
}
.col-xs-11 {
  width: 91.66666667%;
}
.col-xs-10 {
  width: 83.33333333%;
}
.col-xs-9 {
  width: 75%;
}
.col-xs-8 {
  width: 66.66666667%;
}
.col-xs-7 {
  width: 58.33333333%;
}
.col-xs-6 {
  width: 50%;
}
.col-xs-5 {
  width: 41.66666667%;
}
.col-xs-4 {
  width: 33.33333333%;
}
.col-xs-3 {
  width: 25%;
}
.col-xs-2 {
  width: 16.66666667%;
}
.col-xs-1 {
  width: 8.33333333%;
}
.col-xs-pull-12 {
  right: 100%;
}
.col-xs-pull-11 {
  right: 91.66666667%;
}
.col-xs-pull-10 {
  right: 83.33333333%;
}
.col-xs-pull-9 {
  right: 75%;
}
.col-xs-pull-8 {
  right: 66.66666667%;
}
.col-xs-pull-7 {
  right: 58.33333333%;
}
.col-xs-pull-6 {
  right: 50%;
}
.col-xs-pull-5 {
  right: 41.66666667%;
}
.col-xs-pull-4 {
  right: 33.33333333%;
}
.col-xs-pull-3 {
  right: 25%;
}
.col-xs-pull-2 {
  right: 16.66666667%;
}
.col-xs-pull-1 {
  right: 8.33333333%;
}
.col-xs-pull-0 {
  right: auto;
}
.col-xs-push-12 {
  left: 100%;
}
.col-xs-push-11 {
  left: 91.66666667%;
}
.col-xs-push-10 {
  left: 83.33333333%;
}
.col-xs-push-9 {
  left: 75%;
}
.col-xs-push-8 {
  left: 66.66666667%;
}
.col-xs-push-7 {
  left: 58.33333333%;
}
.col-xs-push-6 {
  left: 50%;
}
.col-xs-push-5 {
  left: 41.66666667%;
}
.col-xs-push-4 {
  left: 33.33333333%;
}
.col-xs-push-3 {
  left: 25%;
}
.col-xs-push-2 {
  left: 16.66666667%;
}
.col-xs-push-1 {
  left: 8.33333333%;
}
.col-xs-push-0 {
  left: auto;
}
.col-xs-offset-12 {
  margin-left: 100%;
}
.col-xs-offset-11 {
  margin-left: 91.66666667%;
}
.col-xs-offset-10 {
  margin-left: 83.33333333%;
}
.col-xs-offset-9 {
  margin-left: 75%;
}
.col-xs-offset-8 {
  margin-left: 66.66666667%;
}
.col-xs-offset-7 {
  margin-left: 58.33333333%;
}
.col-xs-offset-6 {
  margin-left: 50%;
}
.col-xs-offset-5 {
  margin-left: 41.66666667%;
}
.col-xs-offset-4 {
  margin-left: 33.33333333%;
}
.col-xs-offset-3 {
  margin-left: 25%;
}
.col-xs-offset-2 {
  margin-left: 16.66666667%;
}
.col-xs-offset-1 {
  margin-left: 8.33333333%;
}
.col-xs-offset-0 {
  margin-left: 0%;
}
@media (min-width: 768px) {
  .col, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
    float: left;
  }
  .col-sm-12 {
    width: 100%;
  }
  .col-sm-11 {
    width: 91.66666667%;
  }
  .col-sm-10 {
    width: 83.33333333%;
  }
  .col-sm-9 {
    width: 75%;
  }
  .col-sm-8 {
    width: 66.66666667%;
  }
  .col-sm-7 {
    width: 58.33333333%;
  }
  .col-sm-6 {
    width: 50%;
  }
  .col-sm-5 {
    width: 41.66666667%;
  }
  .col-sm-4 {
    width: 33.33333333%;
  }
  .col-sm-3 {
    width: 25%;
  }
  .col-sm-2 {
    width: 16.66666667%;
  }
  .col-sm-1 {
    width: 8.33333333%;
  }
  .col-sm-pull-12 {
    right: 100%;
  }
  .col-sm-pull-11 {
    right: 91.66666667%;
  }
  .col-sm-pull-10 {
    right: 83.33333333%;
  }
  .col-sm-pull-9 {
    right: 75%;
  }
  .col-sm-pull-8 {
    right: 66.66666667%;
  }
  .col-sm-pull-7 {
    right: 58.33333333%;
  }
  .col-sm-pull-6 {
    right: 50%;
  }
  .col-sm-pull-5 {
    right: 41.66666667%;
  }
  .col-sm-pull-4 {
    right: 33.33333333%;
  }
  .col-sm-pull-3 {
    right: 25%;
  }
  .col-sm-pull-2 {
    right: 16.66666667%;
  }
  .col-sm-pull-1 {
    right: 8.33333333%;
  }
  .col-sm-pull-0 {
    right: auto;
  }
  .col-sm-push-12 {
    left: 100%;
  }
  .col-sm-push-11 {
    left: 91.66666667%;
  }
  .col-sm-push-10 {
    left: 83.33333333%;
  }
  .col-sm-push-9 {
    left: 75%;
  }
  .col-sm-push-8 {
    left: 66.66666667%;
  }
  .col-sm-push-7 {
    left: 58.33333333%;
  }
  .col-sm-push-6 {
    left: 50%;
  }
  .col-sm-push-5 {
    left: 41.66666667%;
  }
  .col-sm-push-4 {
    left: 33.33333333%;
  }
  .col-sm-push-3 {
    left: 25%;
  }
  .col-sm-push-2 {
    left: 16.66666667%;
  }
  .col-sm-push-1 {
    left: 8.33333333%;
  }
  .col-sm-push-0 {
    left: auto;
  }
  .col-sm-offset-12 {
    margin-left: 100%;
  }
  .col-sm-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-sm-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-sm-offset-9 {
    margin-left: 75%;
  }
  .col-sm-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-sm-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-sm-offset-6 {
    margin-left: 50%;
  }
  .col-sm-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-sm-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-sm-offset-3 {
    margin-left: 25%;
  }
  .col-sm-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-sm-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-sm-offset-0 {
    margin-left: 0%;
  }
}
@media (min-width: 992px) {
  .col, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    float: left;
  }
  .col-md-12 {
    width: 100%;
  }
  .col-md-11 {
    width: 91.66666667%;
  }
  .col-md-10 {
    width: 83.33333333%;
  }
  .col-md-9 {
    width: 75%;
  }
  .col-md-8 {
    width: 66.66666667%;
  }
  .col-md-7 {
    width: 58.33333333%;
  }
  .col-md-6 {
    width: 50%;
  }
  .col-md-5 {
    width: 41.66666667%;
  }
  .col-md-4 {
    width: 33.33333333%;
  }
  .col-md-3 {
    width: 25%;
  }
  .col-md-2 {
    width: 16.66666667%;
  }
  .col-md-1 {
    width: 8.33333333%;
  }
  .col-md-pull-12 {
    right: 100%;
  }
  .col-md-pull-11 {
    right: 91.66666667%;
  }
  .col-md-pull-10 {
    right: 83.33333333%;
  }
  .col-md-pull-9 {
    right: 75%;
  }
  .col-md-pull-8 {
    right: 66.66666667%;
  }
  .col-md-pull-7 {
    right: 58.33333333%;
  }
  .col-md-pull-6 {
    right: 50%;
  }
  .col-md-pull-5 {
    right: 41.66666667%;
  }
  .col-md-pull-4 {
    right: 33.33333333%;
  }
  .col-md-pull-3 {
    right: 25%;
  }
  .col-md-pull-2 {
    right: 16.66666667%;
  }
  .col-md-pull-1 {
    right: 8.33333333%;
  }
  .col-md-pull-0 {
    right: auto;
  }
  .col-md-push-12 {
    left: 100%;
  }
  .col-md-push-11 {
    left: 91.66666667%;
  }
  .col-md-push-10 {
    left: 83.33333333%;
  }
  .col-md-push-9 {
    left: 75%;
  }
  .col-md-push-8 {
    left: 66.66666667%;
  }
  .col-md-push-7 {
    left: 58.33333333%;
  }
  .col-md-push-6 {
    left: 50%;
  }
  .col-md-push-5 {
    left: 41.66666667%;
  }
  .col-md-push-4 {
    left: 33.33333333%;
  }
  .col-md-push-3 {
    left: 25%;
  }
  .col-md-push-2 {
    left: 16.66666667%;
  }
  .col-md-push-1 {
    left: 8.33333333%;
  }
  .col-md-push-0 {
    left: auto;
  }
  .col-md-offset-12 {
    margin-left: 100%;
  }
  .col-md-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-md-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-md-offset-9 {
    margin-left: 75%;
  }
  .col-md-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-md-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-md-offset-6 {
    margin-left: 50%;
  }
  .col-md-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-md-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-md-offset-3 {
    margin-left: 25%;
  }
  .col-md-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-md-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-md-offset-0 {
    margin-left: 0%;
  }
}
@media (min-width: 1200px) {
  .col, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    float: left;
  }
  .col-lg-12 {
    width: 100%;
  }
  .col-lg-11 {
    width: 91.66666667%;
  }
  .col-lg-10 {
    width: 83.33333333%;
  }
  .col-lg-9 {
    width: 75%;
  }
  .col-lg-8 {
    width: 66.66666667%;
  }
  .col-lg-7 {
    width: 58.33333333%;
  }
  .col-lg-6 {
    width: 50%;
  }
  .col-lg-5 {
    width: 41.66666667%;
  }
  .col-lg-4 {
    width: 33.33333333%;
  }
  .col-lg-3 {
    width: 25%;
  }
  .col-lg-2 {
    width: 16.66666667%;
  }
  .col-lg-1 {
    width: 8.33333333%;
  }
  .col-lg-pull-12 {
    right: 100%;
  }
  .col-lg-pull-11 {
    right: 91.66666667%;
  }
  .col-lg-pull-10 {
    right: 83.33333333%;
  }
  .col-lg-pull-9 {
    right: 75%;
  }
  .col-lg-pull-8 {
    right: 66.66666667%;
  }
  .col-lg-pull-7 {
    right: 58.33333333%;
  }
  .col-lg-pull-6 {
    right: 50%;
  }
  .col-lg-pull-5 {
    right: 41.66666667%;
  }
  .col-lg-pull-4 {
    right: 33.33333333%;
  }
  .col-lg-pull-3 {
    right: 25%;
  }
  .col-lg-pull-2 {
    right: 16.66666667%;
  }
  .col-lg-pull-1 {
    right: 8.33333333%;
  }
  .col-lg-pull-0 {
    right: auto;
  }
  .col-lg-push-12 {
    left: 100%;
  }
  .col-lg-push-11 {
    left: 91.66666667%;
  }
  .col-lg-push-10 {
    left: 83.33333333%;
  }
  .col-lg-push-9 {
    left: 75%;
  }
  .col-lg-push-8 {
    left: 66.66666667%;
  }
  .col-lg-push-7 {
    left: 58.33333333%;
  }
  .col-lg-push-6 {
    left: 50%;
  }
  .col-lg-push-5 {
    left: 41.66666667%;
  }
  .col-lg-push-4 {
    left: 33.33333333%;
  }
  .col-lg-push-3 {
    left: 25%;
  }
  .col-lg-push-2 {
    left: 16.66666667%;
  }
  .col-lg-push-1 {
    left: 8.33333333%;
  }
  .col-lg-push-0 {
    left: auto;
  }
  .col-lg-offset-12 {
    margin-left: 100%;
  }
  .col-lg-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-lg-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-lg-offset-9 {
    margin-left: 75%;
  }
  .col-lg-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-lg-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-lg-offset-6 {
    margin-left: 50%;
  }
  .col-lg-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-lg-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-lg-offset-3 {
    margin-left: 25%;
  }
  .col-lg-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-lg-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-lg-offset-0 {
    margin-left: 0%;
  }
}
.clearfix,
.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after {
  content: " ";
  display: table;
}
.clearfix:after,
.container:after,
.container-fluid:after,
.row:after {
  clear: both;
}
.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.pull-right {
  float: right !important;
}
.pull-left {
  float: left !important;
}
*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

$light-gray: #d7dcdf;
$white-gray: #ebeeef;
$green: #649b28;
$red: #a23d3d;
$gold: #FF9900;

$label: $white-gray;
$range-handle-color: $light-gray;
$range-handle-outline-color: white;
$range-handle-color-hover: $green;
$range-handle-height: 32px;
$range-handle-width: 32px;
$range-track-color: $light-gray;
$range-track-border-radius: 5px;
$range-track-value-color: $green;
$range-track-owed-color: $red;
$range-track-height: 10px;
$range-label-color: $label;
$approved-amount-color: $gold;

@mixin label() {
  font-size: large;
  color: $label;
  
  @Media(max-width: 767px) {
    font-size: medium;
    padding-bottom: 8px;
  }
}

@mixin labelLarge() {
  @include label();
  
  font-size: xx-large;
}

@mixin track {
  cursor: pointer;
  height: $range-track-height;
  //transition: all .2s ease;
  width: 100%;
  outline: none;
  border-radius: $range-track-border-radius;
  background-color: range-track-color;
}

@mixin handle {
  width: $range-handle-width;
  height: $range-handle-height;
  border-radius: 50%;
  border: 4px solid $range-handle-outline-color;
  background: $range-handle-color;
  cursor: pointer;
}


// Reset
* {
  &, &:before, &:after {
    box-sizing: border-box;
  }
}

.equity-calc {
  font-family: sans-serif;
  width: 100%;
  padding: 8px;
  text-align: center;
  line-height: normal;
}

.range-slider-group {
  margin-top: 32px;
}

.control-group {
  width: 100%;
  display: inline-table;
}

.range-slider {
  display: table-cell;
  vertical-align: middle;
}

.range-slider__range {
  -webkit-appearance: none;
  //margin: ($range-handle-height/2) 0;
  width: 100%;
  
  border-radius: $range-track-border-radius;
  outline: none;
  
  //Required for jQuery to fill right side of slider
  border-color: $range-track-color;
  
  &.red {
    color: $red;
    //border-color: $range-track-color;
  }
  
  &.green {
    color: $green;
    //border-color: $range-track-color;
  }
  
  //Chrome
  &::-webkit-slider-runnable-track {
    @include track;
  }
  &::-webkit-slider-thumb {
    @include handle;
    -webkit-appearance: none;
    margin-top: (($range-track-height) / 2) - ($range-handle-height / 2);

    &:hover {
      //background: $range-handle-color-hover;
    }
  }
  
  //Firefox
  &::-moz-range-track {
    @include track;
  }
  &::-moz-range-thumb {
   @include handle;

    &:hover {
      //background: $range-handle-color-hover;
    }
  }
  
  //IE/Edge
  &::-ms-track {
    @include track;
    border-width: ($range-handle-height / 2) 0;

    /* Hides the slider so custom styles can be added */
    background: transparent; 
    border-color: transparent;
    color: transparent;
  }
  &.red::-ms-fill-lower {
    background: $red;
    border-radius: $range-track-border-radius;
  }
  &.green::-ms-fill-lower {
    background: $green;
    border-radius: $range-track-border-radius;
  }
  &::-ms-fill-upper {
    background: $range-track-color;
    border-radius: $range-track-border-radius;
  }
  &::-ms-thumb {
    @include handle;
    margin-top: 0;
  }
  
  //Opera
  &::o-track {
    
  }
  
  
}


.sliderfill {
  border: 2px solid #red;
  border-radius: 4px;
  position: absolute;
  opacity: 0.2;
  pointer-events: none;
  background: red;
  background: linear-gradient(90deg, #005555, #006699);
}

.range-slider__value {
  display: table-cell;
  vertical-align: middle;
  width: 128px;
  color: $range-label-color;
  text-align: right;
  font-size: xx-large;
  
  @Media(max-width: 767px) {
    font-size: x-large;
    width: 96px;
  }
}

.range-slider__label {
  @include label();
  width: 100%;
  text-align: left;
}

// Firefox Overrides
::-moz-range-track {
  background: $range-track-color;
  border: 0;
}

input::-moz-focus-inner, input::-moz-focus-outer {
  border: 0;
}

.approved-amount {
  margin-top: 32px;
  width: 100%;
  
  @Media(max-width: 767px) {
    
  }
  
  
}

.approved-amount__label {
  @include labelLarge();
  
  padding-top: 32px;
  float: right;
  text-align: right;
  width: 100px;
  
  @Media(max-width: 767px) {
    float: left;
    text-align: left;
    width: 100%;
    padding-top: 0;
  }
}

.approved-amount__value {
  
  font-size: 128px;
  color: $approved-amount-color;
  //float: left;
  text-align: left;
 
  @Media(max-width: 600px) {
    font-size: 100px;
  }
  
  @Media(max-width: 480px) {
    font-size: 70px;
  }
  
  @Media(max-width: 380px) {
    font-size: 64px;
  }
}

            
          
!
            
              $(function() {
  var home = $("#homeValue");
  var principal = $("#principalAmount");
  var homeTag = $("#homeTag");
  var principalTag = $("#principalTag");
  var approvedAmount = $("#approvedAmount");

  home.on("input change", onSlide).trigger("change");
  principal.on("input change", onSlide).trigger("change");

  function onSlide(e, element) {
    var input = $(this);
    
    if (element) {
      input = element;
    }

    var pc = Math.floor(input.val() * 100 / input[0].max);
    if (pc > 100) pc = 100;

    var fill = input.css("color");
    var background = "#d7dcdf"; //$(this).css("border-color");

    var styleId = input[0].id + "Background";
    var style = `background: linear-gradient(to right, ${fill} ${pc}%, ${background} 0%)`;
    //FireFox
    var trackStyle = `#${input[0].id}::-moz-range-track {${style};}`;
    //Chrome/Safari/Opera
    trackStyle += `#${input[0].id}::-webkit-slider-runnable-track {${style};}`;
    //IE/Edge has css implementation for lower and upper fill so this is not needed there...

    var styleTag = $(`<style id="${styleId}">${trackStyle}</style>`);
    $(styleId).remove();
    $(input).append(styleTag);

    //Did not work because background is on specific browser selection
    /*$(this).css({
      'background': `linear-gradient(to right, ${fill} ${pc}%, ${background} 0%)`
    });*/

    onRefresh();

    var minOwed = home.val() * 0.95 - 15;

    if (principal.val() > minOwed && !element) {
      principal.val(minOwed);
      onSlide(e, principal);
    }
  }

  function onRefresh() {
    homeTag.text(home.val());
    principalTag.text(principal.val());

    var maxBorrow = home.val() * 0.95;
    var maxLoan = maxBorrow - principal.val();

    if (maxLoan < 15) {
      maxLoan = 15;
    } else if (maxLoan > 350) {
      maxLoan = 350;
    }

    var equity = Math.floor(maxLoan * 1000);

    approvedAmount.text(equity.toLocaleString("en", { useGrouping: true }));
  }
});

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console