I am trying to add a CSS attribute using jQuery but having an issue with the Background selector. Right now I have:
$('#nav_wrap').css({ 'position': 'fixed',
'margin-top':0,
'z-index':400,
'background-color': 'red',
'top':0,
'left':0 });
which gives the the color Red just fine, nothing wrong with the code. What I want to do is make it a gradient but when I change it to this:
$('#nav_wrap').css({ 'position': 'fixed',
'margin-top':0,
'z-index':400,
'background': 'linear-gradient(top, #dc0000 0%,#650101 100%)',
'top':0, 'left':0 });
The background attribute doesnt get recognized. Any ideas why? Thanks.
linear-gradientisn't cross browser.