This is not a problem with muted, but with the way you add JavaScript files to your code. Right now, you are adding all the JS files to the section headat the top of the page:
<head>
<title></title>
<link rel="stylesheet" href="PrveReci4IvanCss.css" type="text/css">
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="preload2.js"> </script>
<script src="./main.js"></script>
</head>
, script . . JS (, ):
var IvanCar = document.getElementById('MuzikaPlayer');
...
volume=!volume;
if(volume==true)
{
document.getElementById("btnVolume").style.left="1407px";
IvanCar.muted = false;
}
else
{
document.getElementById("btnVolume").style.left="1304px";
IvanCar.muted = true;
}
( , 20) #MuzikaPlayer, IvanCar undefined, , , . , .
, : JS head body ( ):
...
<audio id="MuzikaPlayer" loop autoplay>
<source src="Slike/FunMusic.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="preload2.js"> </script>
<script src="./main.js"></script>
</body>
</html>
, script, #MuzikaPlayer , .