I am having trouble applying a style that is !important. I’ve tried:
!important
$(\"#elem\").css(\"width\", \"100px
An alternative way to append style in head:
$('head').append('');
This appends style after all your CSS files so it will have higher priority than other CSS files and will be applied.