I am having trouble applying a style that is !important. I’ve tried:
!important
$(\"#elem\").css(\"width\", \"100px
If it is not so relevant and since you're dealing with one element which is #elem, you can change its id to something else and style it as you wish...
#elem
$('#elem').attr('id', 'cheaterId');
And in your CSS:
#cheaterId { width: 100px;}