javascript - jQuery change name on mute button -
i need mute button, can sound muted , unmuted, want button change when click on mute button, change unmute on button
function mutebutton() { var lyden_er_muted = $("#kor").get(0).muted; if (lyden_er_muted == true) { $("#kor").get(0).muted = false; $("#snorken").get(0).muted = false; $("#tramper").get(0).muted = false; $(".mute").text("mute music"); } else{ //1: mute lyden $("#kor").get(0).muted = true; $("#snorken").get(0).muted = true; $("#tramper").get(0).muted = true; $(".mute").text("unmute music"); } }
Comments
Post a Comment