Those are really going to be your only (good practice) choices. Either use !important, or don’t use inline. Like he said above, you should be using JS to add a class, than use the css in a css file to change the actual style on the element.
> sometimes, we need to change the css property dynamically, let’s say using jQuery’ css() function which will update the inline style
Could you give an example of a situation where this would be preferable to just changing a class? The latter is simpler, more readable and easier code to maintain or modify. I simply don’t believe the quoted statement to be true.
Could you post a codepen or similar? My feeling is that most problems of this sort can be resolved by reformulating your approach to the original task. In some ways it is reminiscent of [the chocolate coated banana](http://perl.plover.com./Questions3.html “More About How to Ask a Good Question”), where understanding your goal is more beneficial than producing an answer to your original question.