Hello everyone,
I would like to know how to activate a sound whenever I hover over an icon, without having to click or have the Readymag sound widget displayed (SoundCloud thumbnail too big to hide).
Can you guys help me ?
Thaaanks
Hello everyone,
I would like to know how to activate a sound whenever I hover over an icon, without having to click or have the Readymag sound widget displayed (SoundCloud thumbnail too big to hide).
Can you guys help me ?
Thaaanks
Hey, you have to find out how to address your icon element, depending on how you created it.
Here I adress it using the class selector “.icon”.
Put this in a custom code widget:
<audio id="mp3" src="addyourURL"></audio>
<script>
var audio1 = $("#mp3")[0];
var icon = $(".icon"); //----- exchange this to your icon.
//Play the file when the mouse leaves the icon
icon.mouseover (function (){
audio1.play();
});
//Pause the file when the mouse leaves the icon
icon.mouseleave (function (){
audio1.pause();
});
```
Is there any tutorial about this topic? I also would like to include sounds in my buttons, seems like an obvious feature that is missing. thanks.
I’m interested in this as well. Have you found anything?
Thanks.