Guest Posted April 5, 2021 Share Posted April 5, 2021 Hi, I have 2 images overlay. I want to trigger a sound by clicking on the upper image (olaf.gif) I have sound on image but I lose all criteria: size olaf.gif, onClick and onMouseOut on 5.png. Thank you for your help. Voizins <script> function play(){ var audio = document.getElementById("audio"); audio.play(); } </script> <td align="center" valign="middle"><img src="Images/olaf.gif" value="PLAY" onclick="play()"> <audio id="audio" src="Sound/TOON.wav" ></audio> width="100" height="75" alt="" onClick="this.src='Images/5.png';" onMouseOut="this.src='Images/5.png' /></td> Link to comment
Beyondspace Posted April 9, 2021 Share Posted April 9, 2021 On 4/5/2021 at 10:57 PM, voizins said: Hi, I have 2 images overlay. I want to trigger a sound by clicking on the upper image (olaf.gif) I have sound on image but I lose all criteria: size olaf.gif, onClick and onMouseOut on 5.png. Thank you for your help. Voizins <script> function play(){ var audio = document.getElementById("audio"); audio.play(); } </script> <td align="center" valign="middle"><img src="Images/olaf.gif" value="PLAY" onclick="play()"> <audio id="audio" src="Sound/TOON.wav" ></audio> width="100" height="75" alt="" onClick="this.src='Images/5.png';" onMouseOut="this.src='Images/5.png' /></td> What is your current site url, we can help having a look Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment