How to include !important in jquery

Solution 1:

Apparently it's possible to do this in jQuery:

$("#tabs").css("cssText", "height: 650px !important;");

Src: http://bugs.jquery.com/ticket/2066

Solution 2:

I solved this problem with:

inputObj.css('cssText', inputObj.attr('style')+'padding-left: ' + (width + 5) + 'px !IMPORTANT;');

So no inline-Style is lost, an the last overrides the first

Solution 3:

It is also possible to add more important properties:

inputObj.attr('style', 'color:black !important; background-color:#428bca !important;');