I have a Javascript slider bar which uses an array for the options. However, It does not change as you drag.
var img = document.getElementById('img');
var img_array = ['http://www.w3schools.com/images/w3logotest2.png', 'http://www.w3schools.com/html/img_html5_html5.gif'];
function setImage(obj) {
var value = obj.value;
img.src = img_array[value];
}
<img id='img' src='http://www.w3schools.com/images/w3logotest2.png' />
<input onchange='setImage(this)' type="range" min="0" max="1" value="0" step="1" />
can anyone give me some guidance on how to change the image while I am dragging the slider, rather than when I let go of the mouse button