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
Try modifying the "style" attribute:
$('myObject').attr('style', 'background-image: url("' + imageUrl +'")');