Hi,
I have a url in a variable, and I am having issues setting the value in css.
$('myOjbect').css('background-image', imageUrl);
Any pointers?
Hi,
I have a url in a variable, and I am having issues setting the value in css.
$('myOjbect').css('background-image', imageUrl);
Any pointers?
You probably want this (to make it like a normal CSS background-image declaration):
$('myOjbect').css('background-image', 'url(' + imageUrl + ')');