Hello, in my graduation work I need to turn on music by clicking on the widget.
I tried to write the code, but it didn’t work out, I’m upset. Is it even possible?
I could leave you a small donation for your help…
Hello, in my graduation work I need to turn on music by clicking on the widget.
I tried to write the code, but it didn’t work out, I’m upset. Is it even possible?
I could leave you a small donation for your help…
HI @_442002 I would suggest sharing the code you have! But here i’ve attached an example.
<script src="https://code.jquery.com/jquery-3.6.1.js"></script>
<script>
var audioNAMEHERE = document.createElement('audio');
audioNAMEHERE.setAttribute('src', 'YOUR-AUDIO-URL-HERE');
audioNAMEHERE.addEventListener("load", function() {
audioNAMEHERE.play();
}, true);
$('[READYMAG DATA ID HERE]').click(function() {
audioNAMEHERE.play();
});
</script>
Hello, thank you SO much for the answer, I just saw it now. I don’t understand your code well, but I did everything as indicated in your comments: I added a link to the sound and found the ID of my standard shape‐widget readymag, BUT nothing worked for me. nothing happens by click, please poke me in my the error. Thank you dear!
thank you very much, I got everything, I had to replace the numbers with words
Hi, I’m struggling with the same issue. Don’t really know much about code, so I also can’t seem to figure it out myself. What am I supposed to fill in at the “audioNAMEHERE” parts of the code? If I fill in the name of my audio file that’s in dropbox it won’t work. Please let mr know! Thanks
simply change “audioNAMEHERE” to “GARDEN”