JSFiddle - React, Tailwind, and code Playground
HTML
<div id='s' style="border:1px black solid">asdasd</div>
CSS
#s {
width:11px;
}
JavaScript
jQuery.fn.isAuto=function() {
if(this[0]) {
var ele=$(this[0]);
if(this[0].style.width=='auto' || ele.outerWidth()==$('#s').parent().width()) {
return true;
} else {
return false;
}
}
return undefined;
};
alert($('#s').isAuto());