- 1
Help me!
The JS is supposed to change audio source but it still plays the same default song. https://code.sololearn.com/We8fbx5OStUQ/#js
5 Antworten
+ 6
- Use 'oniput' event instead 'onblur' at <select> element
- Use 'id="stage10"' instead of 'class' or change your JQuery selector from '#stage10' to '.stage10'
- Don't select the source element, but apply new url to 'src' attribute: $('#stage10').attr('src', songs[x])
- No need to use load() method
+ 6
Actually your code doesn't plays the same song by default ( on the last player on your page ) and after selecting "winter" in the dropdown list ( I've not tested all )...
However, the "play()" method seems to not be available in code playground, so you need to manually click the play button ^^ ( and some of your linked audio files are not available now: 66.90.93.122 works, but not 66.90.94.162 :P )
+ 1
How do I use them
+ 1
it still plays the same song
EDIT: I just checked the CSS...
I was so used at using ID instead of Class
0
Watch YouTube tutorials they really Help with stuff like that.