Is there a way to dynamically add an important tag to the CSS height property of #content located on line 7 in the code snippet below? I need to use the variable $newHeight to ensure flexibility.
Can anyone provide guidance on how to append an !important declaration to this specific CSS rule? Attempts using concatenation with the plus (+) sign have been unsuccessful so far.
See the code snippet:
$(window).resize(function() {
var $windowHeight = $(window).height();
var $newHeight = $(window).height()-$('#footer').height()-153;
if ($windowHeight < 847){
$('#content').css("height",$newHeight);
}
});