This should be super simple but I keep getting errors.
I have a JSON string that I need to add a js variable to, the code sample is below. Essentially I need to add frameVideo variable after the hash tag in the URL string.
var frameVideo = window.location.hash.substring(1);
jwplayer("sVid").setup({
'share-video': {
'code': '<embed src="http://www.website.com/test.php#"\'.frameVideo.\'" width="480" height="270" allowfullscreen="true" />'
},
});
What do I need to do differently?
You’re using PHP concatenation instead of javascript style.