Add html5 sound to Salient
Add this into the Custom CSS box located in your Salient Options panel (All custom css provided is tested in the Live Browser so it will work as intended . If you cant see any changes make sure there is no red cross in the Custom CSS Box as that syntax error would cause all css below it to not show up on the Frontend):
/*add sound close icon*/ li#nectar-user-account.none .icon-salient-m-user:before { content: "\e099" !important; }
Add this to the Custom JS Box :
<audio controls="" volume="0.5" autoplay="" loop="" id="muzyka"> <source src="https://tomgacz.pl/wp-content/uploads/2020/02/Creative-Showcase-Portfolio-Theme-_8211-Just-another-WordPress-site.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <script> var audio = document.getElementById("muzyka"); audio.volume = 0.3; </script> <script> var audio = document.getElementById('muzyka'); var btn = document.getElementById('nectar-user-account'); btn.classList.add("selected"); btn.addEventListener('click', function (e) { e = e || window.event; audio.muted = !audio.muted; if (btn.className == "selected") { btn.classList.add("none"); } else { btn.classList.replace("none","selected"); } e.preventDefault(); }, false);</script>