JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<div id="container" class="main-class"></div>

CSS

.main-class {
  border: 1px solid gray;
  width: 500px;
  height: 100px;
  padding: 10px;
}

JavaScript

$(document).ready(function() {
  var width = $("#container").width();
  var height = $("#container").height();
  alert(`${width} x ${height}`);
});