Friday, 30 August 2013

onchange event on input type=range is not triggering in firefox while dragging

onchange event on input type=range is not triggering in firefox while
dragging

When i played with <input type="range">, Firefox triggers an onchange
event only if we drop the slider to a new position where Chrome and others
triggers onchange events while the slider is dragged.
How can i make it happen on dragging in firefox?
HTML
<span id="valBox"></span>
<input type="range" min="5" max="10" step="1" onchange="showVal(this.value)">
SCRIPT
function showVal(newVal){
document.getElementById("valBox").innerHTML=newVal;
}

No comments:

Post a Comment