Danish Danish - 5 months ago 43
Javascript Question

How do I customize progress bar, that user can drag and change the value?



I want the progress bar that look like this, I found some bootstrap progress bar but their is no customized values

Answer

There's actually an HTML element for this!

$('#myRange').mousemove(function(){
    $('#rangeValue').text($('#myRange').val());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="range" id="myRange" value="1" max="100">
<div id="rangeValue">1</div>