You cannot add an !important declaration to your CSS using jQuery’s .css method, but you can add it using .attr with style like so. This method keeps the original style declarations.
!important
.css
.attr
style
function setMyCSS( element, setting, value ) { $( element ).attr( 'style', function( i, s ) { return ( s || '' ) + setting + ':' + value + '!important;' } ); } setMyCSS( 'body', 'background-color', 'red' );