I want to change background dynamically in JS and my set of images is in base64 encoded. I try:
document.getElementById(\"bg_image\").style.backgroundImage =
What I usually do, is to store the full string into a variable first, like so:
Then, where I want either JS to do something with that variable:
You could reference the same variable via PHP directly using something like:
Works for me ;)