$("#mute").click(function(){
$("#audioplayer")[0].muted = $("#audioplayer")[0].muted;
$("#message").text("Volume muted");
})
What I need to achieve is when the users clicks again the button “mute”, they will receive another message with “Volume UnMuted”, instead of muted, if he clicks it again, switch back to mute, and so on.
Try the following