When setting the CSS property "padding-top" to a value stored in a variable (currentHeight), such as:
jQuery("#page-container").css("padding-top", currentHeight);
It functions correctly and produces:
<div id="page-container" style="padding-top: 115px;">
...
However, the padding-top property needs to be !important like this:
<div id="page-container" style="padding-top: 115px!important;">
...
If attempting to add !important like this:
jQuery('#page-container').css({'padding-top': currentHeight + '!important'});
The CSS property "padding-top" is not applied to the element page-container, resulting in:
<div id="page-container">
How can this issue be resolved?
Thank you