Use jQuery to change a CSS value
- by justSteve
If i have a background image defined as:
#header
{
width: 100%;
background: url(/Content/images/header.jpg) -0 0 no-repeat;
}
and i want to overwrite that after the page loads. Shouldn't this code work?
$("#header").css('background-image', '/Content/images/aff/header_<%=affiliateID%>.jpg')