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 =
In my case, it was just because I didn't set the height and width.
height
width
But there is another issue.
The background image could be removed using
element.style.backgroundImage=""
but couldn't be set using
element.style.backgroundImage="some base64 data"
Jquery works fine.