I am having trouble applying a style that is !important
. I’ve tried:
$(\"#elem\").css(\"width\", \"100px
I also discovered that certain elements or add-on's (like Bootstrap) have some special class cases where they do not play well with !important
or other work-arounds like .addClass/.removeClass
, and thus you have to to toggle them on/off.
For example, if you use something like Hopefully this work-around will be helpful to someone! :)the only way to successfully modify elements like colors of rows is to toggle the
table-hover
class on/off, like this
$(your_element).closest("table").toggleClass("table-hover");