I have created a range slider, but I am facing an issue with the oninput event. I want to increment a specific amount whenever the slider is adjusted. For example, I want to increase the amount by $150 when the slider is at $2000, and by $45000 for a particular range on the slider. Can someone assist me in achieving this functionality? Any help would be greatly appreciated!
var range = document.getElementById("range");
var val = document.getElementById("value");
var vvv = document.getElementById("vvv");
var saved = document.getElementById("saved");
val.innerHTML = "$" + range.value + "K";
range.oninput = function() {
val.innerHTML = "$" + this.value + "K";
}
html,
body,
...
...
...
<script src="https://kit.fontawesome.com/b99f2762a6.js" crossorigin="anonymous"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<div class="heading">
...
...
...