The volume property is similar to opacity, it goes from zero to one, and 100%.
Your code is so close, you just need to divide the value to 100 at the mounting volume of <audio> :
$("#slider").slider({ value : 75, step : 1, range : 'min', min : 0, max : 100, change : function(){ var value = $("#slider").slider("value"); document.getElementById("audio-player").volume = (value / 100); } });
Note. I also put the change event handler in the initialization of the slider widget.
When I paste the above code into the console while on your web page and the volume slider worked properly.
In addition, you can snap to the slide event, and the volume will change as the user slides the slider widget, and not just after they finish moving the handle:
$("#slider").slider({ value : 75, step : 1, range : 'min', min : 0, max : 100, slide : function(){ var value = $("#slider").slider("value"); document.getElementById("audio-player").volume = (value / 100); } });
source share