+ 1

How can I make the melody play when I click on a specific element

I need to do it.

5th Jul 2020, 10:12 AM
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an - avatar
4 Answers
+ 2
Thanks
5th Jul 2020, 10:35 AM
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an - avatar
+ 1
You can add the below function to you event listener: function myFunction() { var x = document.getElementById("myAudio").play(); }
5th Jul 2020, 10:30 AM
JaScript
JaScript - avatar
+ 1
And: Const play=()=>{ Let x=$("#myaudio").play() }
5th Jul 2020, 10:34 AM
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an
ŠŸŃ€Š¾100 4ŠµŠ»Š¾Š²e4ŠµŠŗ || Just A 1000000an - avatar
0
jq I find here unnecessary
5th Jul 2020, 10:49 AM
JaScript
JaScript - avatar