This is what I have:
$("#list .active").closest('.header').css({
'background-color' : '#1a2e51',
'background-image' : '-webkit-gradient(linear, left top, left bottom, from(#2c3c6f), to(#071f31))',
'background-image' : '-webkit-linear-gradient(top, #2c3c6f, #071f31)',
'background-image' : '-moz-linear-gradient(top, #2c3c6f, #071f31)',
'background-image' : '-o-linear-gradient(top, #2c3c6f, #071f31)',
'background-image' : 'linear-gradient(to bottom, #2c3c6f, #071f31)'
});
Online example: http://jsfiddle.net/qSfvK/
However, it won't show me a gradient because I didn't write it well in jQuery, so how to do it?
EDIT
I can make it work in CSS but not in jquery, see what I mean by looking at this link:
http://jsfiddle.net/qSfvK/10/
addClass?