I am having trouble applying a style that is !important. I’ve tried:
!important
$(\"#elem\").css(\"width\", \"100px
After reading other answers and experimenting, this is what works for me:
$(".selector")[0].style.setProperty( 'style', 'value', 'important' );
This doesn't work in IE 8 and under, though.