I have a range input and I want to select its values just when I click on it. The problem is that if you click on the range, left the mouse on the top of the range and scroll the mousewheel it will change the value of the range.
I have already tried by CSS and jQuery, but I can't figure it out how to do it. I also want to define a default value to start the scroll, but I am not managing how.
Here is the fiddle.
<input type="range" id="range_year_donut" min="" max="" value="" onchange="slideyear()">
<span id="chosen_year"></span>
var range_year = d3.select("#range_year_donut");
d3.csv("http://raw.githubusercontent.com/cvrnogueira/CODWorkData/master/database/final_data_set.csv").then(function(data){
let max = d3.max(data, function(d) {return +d.year});
let min = d3.min(data, function(d) {return +d.year});
range_year.attr("min", min)
.attr("max", max)
.attr("value", max);
});
function slideyear(){
let year = range_year.node().value;
}