JSFiddle - React, Tailwind, and code Playground

HTML

<div class='my_class'>
Hi, this is pritom!!! click here to add color as important style
</div>

CSS

.my_class {
    color: red !important;
}

JavaScript

var div = $(".my_class")
div.click(function() {
	div.style("color", "blue", "important")
    div.append("<div>Color: " + div.style('color') + "</div>")
	div.append("<div>Is_Important: " + div.style().getPropertyPriority('color') + "</div>")
})

$.fn.style = function(styleName, value, priority) {
    var node = this.get(0)
    if (typeof node == 'undefined') {
        return
    }
    var style = node.style
    if (typeof styleName != 'undefined') {
        if (typeof value != 'undefined') {
            var priority = typeof priority != 'undefined' ? priority : ''
            style.setProperty(styleName, value, priority)
        }
        else {
            return style.getPropertyValue(styleName)
        }
    } 
    else {
        return style
    }
}