I'm trying to change the css background
style in JavaScript. I'm able to do this
div.style.backgroundImage = "url('img/bg1.png')";
but when I try to add these styles it doesn't work - it returns with this error
Uncaught SyntaxError: Unexpected token - (index):59
div.style.-webkit-background-size = cover;
div.style.-moz-background-size = cover;
div.style.-o-background-size = cover;
div.style.background-size = cover;
is it possible to do this in JavaScript?