- 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

18th Apr 2017, 12:31 AM
koder
koder  - avatar
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
18th Apr 2017, 5:11 AM
visph
visph - avatar
+ 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 )
19th Apr 2017, 4:49 PM
visph
visph - avatar
+ 1
How do I use them
18th Apr 2017, 1:18 AM
koder
koder  - avatar
+ 1
it still plays the same song EDIT: I just checked the CSS... I was so used at using ID instead of Class
18th Apr 2017, 8:55 PM
koder
koder  - avatar
0
Watch YouTube tutorials they really Help with stuff like that.
18th Apr 2017, 2:10 AM
SyntaxError
SyntaxError - avatar