[jQuery] Trouble setting background-image with css
Hi,
I'm trying to set the background image of a DIV named "imageDisplay".
Here's my code:
var imgSrc = "url:('" + src + "')";
$('#imageDisplay').css('background-image', imgSrc);
alert(imgSrc + "\n" + $
('#imageDisplay').css('background-image'));
where src = "../images/back.gif". When that alert pops up, imgSrc
correctly says "url:('../images/back.gif')" but the value of the css
background-image property returned is "none". What am I doing wrong
in the above statement?
- Dave