JSFiddle - React, Tailwind, and code Playground

by ruisoftware

CSS

.span6 {
    width: 570px;
}

JavaScript

var getCSS = function (prop, fromClass) {
  
    var $inspector = $("<div>").css('display', 'none').addClass(fromClass);
    $("body").append($inspector); // add to DOM, in order to read the CSS property
    try {
        return $inspector.css(prop));
    } finally {
        $inspector.remove(); // and remove from DOM
    }
};

alert(getCSS('width', 'span6'));