You probably want this (to make it like a normal CSS background-image declaration):
$('myObject').css('background-image', 'url(' + imageUrl + ')');
More Related Contents:
- When we using alert vs popup div tag? [closed]
- How to hide css and js version details from weppalyzer in PHP
- How to do this mouse over effect in jquery?
- How to make page loaders/animations/transitions
- Download the text over image using jquery
- Turn a number into star rating display using jQuery and CSS
- Instead of using prefixes I want to ask site visitors to upgrade their browser
- How can I remove a style added with .css() function?
- animating addClass/removeClass with jQuery
- Parsing CSS in JavaScript / jQuery
- Determine if an element has a CSS class with jQuery
- Show loading image while $.ajax is performed
- How to show popup message like in Stack Overflow
- Using jQuery how to get click coordinates on the target element
- How do I achieve equal height divs (positioned side by side) with HTML / CSS ?
- How to select all checkboxes with jQuery?
- Dropdown select with images
- css transition doesn’t work if element start hidden
- jquery – How to determine if a div changes its height or any css attribute?
- How to convert unordered list into nicely styled dropdown using jquery?
- Responsive horizontal page sliding
- Scale element proportional to Background Cover with jQuery
- CSS fade left to right
- Bootstrap Dropdown with Hover
- How to get border width in jQuery/javascript
- Rotate div text after clicking on button using jquery and css
- How do I find which JavaScript is changing an element’s style?
- how to use html2canvas and jspdf to export to pdf in a proper and simple way
- How can I reorder elements with JavaScript?
- Can you have multiple lines in an element?