Hi guys, I have an embed script code contain a soundtrack for my web. But I want to move this script to a .js file. Here's my embed script :
<script type="text/javascript" src="http://scmplayer.net/script.js"
data-config="{'skin':'skins/black/skin.css','volume':50,'autoplay':true,'shuffle':false,'repeat':1,'placement':'top',
'showplaylist':false,'playlist':[{'title':'Soundtrack',
'url':'https://soundcloud.com/nlpazali/command-and-conquer-red-alert-3-soundtrack-ra3-theme-soviet-march-www-open-az'}]}" ></script>
Then I tried move that script to my .js file :
script.type = 'text/javascript';
script.src = 'http://scmplayer.net/script.js';
script.data-config = '{'skin':'skins/black/skin.css','volume':50,'autoplay':true,'shuffle':false,'repeat':1,'placement':'top',
'showplaylist':false,'playlist':[{'title':'Soundtrack',
'url':'https:
But the problem, my soundtrack can played with this method. Anyone, can you help to move script file to other .js file? Thanks.