Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js input type range get value while sliding

//If you listen for the change event, the function will run only when the mouse is released. That means it won't run while dragging.
//If you listen for the input event, the function will run even while dragging.

const price_range_input = document.querySelector('#range');

price_range_input.addEventListener('input',e=>{
  const price_value = document.querySelector('.price_range_value');
  price_value.innerHTML = e.target.value;
})
 
PREVIOUS NEXT
Tagged: #js #input #type #range #sliding
ADD COMMENT
Topic
Name
6+5 =