JSFiddle - React, Tailwind, and code Playground

HTML

<head>
  <style>
    #foo {width:200px;height:200px;}
  </style>
</head>

Height:<div id="height-result"></div>
<br>
Width:<div id="width-result"></div>
<svg id="foo"></svg>

<script>
  var h = $("#foo").height(),
      w = $("#foo").width();
  $("#height-result").text(w);
  $("#width-result").text(h);
  console.assert(w == 200,"width() didn't return 200");
  console.assert(h == 200,"height() didn't return 200");
</script>