I need to lower the volume of <audio>
by clicking on the down arrow, but if
is not working, it never enters else
. Why?
Code:
$(document).keyup(function(e) {
if (e.keyCode == 40) {
if ($("#nome").get(0).volume = 0.1)
{
$("#nome").prop('muted', true);
}
else if ($("#nome").get(0).volume = 0.4)
{
$("#nome").prop("volume", 0.1);
}
}
});