+ 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 odpowiedzi
+ 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