JSFiddle - React, Tailwind, and code Playground
by Neal
HTML
<div id='id' style="color: red;background: orange;">test</div>
JavaScript
selector = '#id'
$(selector).click(function() {
//instead of:
var getAtt = this.getAttribute('style');
//do i use:
var thisProp = $(this).prop('style');
//or:
var thisAttr = $(this).attr('style');
console.log(getAtt, thisProp, thisAttr);
});