I am having trouble applying a style that is !important. I’ve tried:
!important
$(\"#elem\").css(\"width\", \"100px
The easiest and best solution for this problem from me was to simply use addClass() instead of .css() or .attr().
For example:
$('#elem').addClass('importantClass');
And in your CSS file:
.importantClass { width: 100px !important; }