If you want to add !important dynamically while using css method, then here is the way to do so.
$("#addImportant").css("cssText","font-size:15 !important;");
When we add the above line into your page, it will render like below, assuming that it has been applied to a div of id named ‘add Important’:
<div id="addImportant" style="font-size:15px !important"></div>
The above snippet has helped me in resolving one of the task which I
need to complete, and hope this might help you some situation.
No comments:
Post a Comment