how to overwrite css height set by jquery/javascript?
Your variables don't match; remember that punctuation and proper spelling are important to calling the variable properly; try changing the second line to:
$("#someElement").css('height',setHeight+'px !important');
Your variable name doesn't have a leading $
. Also, the !important
flag will cause this not to work in Firefox, however as you're applying this style directly to the element, you shouldn't need it.
$("#someElement").css('height', setHeight + "px");
Also note that if you're only setting the element's height you can also just shorten this to a height()
call:
$("#someElement").height(setHeight);
setHeight
, not $setHeight
. and the !important
is unneeded.