Dear Sirs. Actually the functionality is performed. I can not force the button to change the image of the button when turning the sound off and on. Tell me please. Thank.
function mute(btn, elem) { var video = document.getElementById(elem); if (video.muted) { video.muted = false; } else { video.muted = true; } } #sounds { position: absolute; z-index: 101; width: 40px; height: 40px; border: none; padding: 0; top: 46px; left: -2px; } .btn_001 { //ΠΠ°Π΄Π°Π½ΠΈΠ΅ ΠΎΠ±ΡΠ΅Π³ΠΎ ΡΡΠΈΠ»Ρ Π΄Π»Ρ ΠΊΠ½ΠΎΠΏΠΊΠΈ height: 40px; width: 40px; border: none; position: relative; background: lime url(../img/img_473b.png) no-repeat top center; cursor: pointer; } .btn_001:hover { //Π‘ΡΠΈΠ»Ρ ΠΊΠ½ΠΎΠΏΠΊΠΈ ΠΏΡΠΈ Π½ΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠΈ Π½Π° Π½Π΅Π³ΠΎ ΠΊΡΡΡΠΎΡΠ° height: 40px; width: 40px; border: none; background: red url(../img/img_473b2.png) no-repeat top center; } .btn_001:focus { //Π‘ΡΠΈΠ»Ρ ΠΊΠ½ΠΎΠΏΠΊΠΈ, ΠΊΠΎΠ³Π΄Π° ΠΎΠ½Π° Π² ΡΠΎΠΊΡΡΠ΅ height: 40px; width: 40px; border: none; background: red url(../img/img_473b2.png) no-repeat top center; } .btn_001:active { //Π‘ΡΠΈΠ»Ρ ΠΊΠ½ΠΎΠΏΠΊΠΈ ΠΏΡΠΈ Π½Π°ΠΆΠ°ΡΠΈΠΈ height: 40px; width: 40px; border: none; background: lime url(../img/img_473b.png) no-repeat top center; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <div id="in"> <video id="myVideo" width="100%" height="100%" autoplay loop> <source src="img/video/zastavka_1.mp4"></source> <source src="img/video/zastavka.webm" type="video/webm"></source> </video> </div> <div id="sounds"> <button onclick="mute(this, 'myVideo')" class="btn_001"><img src="img/img_473b.png"></button> </div>