I have an image URL in a imageUrl variable and I am trying to set it as CSS style, using jQuery:
imageUrl
$(\'myObject\').css(\'background-image\', image
String interpolation to the rescue.
let imageUrl = 'imageurl.png'; $('myOjbect').css('background-image', `url(${imageUrl})`);