I know im doing something wrong here:
document.getElementById("body_bg_top").style.background-image:url(main_bg_top.jpg);
if any one can correct me i would appriciete it !
thank you
I know im doing something wrong here:
document.getElementById("body_bg_top").style.background-image:url(main_bg_top.jpg);
if any one can correct me i would appriciete it !
thank you
background-image has no hyphen, so just
document.getElementById("body_bg_top").style.backgroundImage="url(main_bg_top.jpg)";
Also need to replace the colon with an equals and wrap the url() in quotes.
http://www.w3schools.com/jsref/prop_style_backgroundimage.asp
With jQuery, you can use:
$('#element-name').css('background-image');
to access that particular CSS property.