I’m trying to change my body’s background dynamically in a jQuery window resize event.
The below is a simplified example that attempts to set the body background url property when the page loads, but its not the right syntax. Any ideas?
test.css:
body {
margin: 0px auto;
font-family: HelveticaNeue;
}
test.html’s JavaScript:
$(document).ready(function() {
$("body").css("background", "url('image/setme.png')");
});
I’d try being explicit about the property: