JSFiddle - React, Tailwind, and code Playground
by Soltuts Tutorial
HTML
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<div id="test" style="height:200px;width:400px; margin:1px;padding:20px; background-color:red;"></div><br>
<button>Get Width</button>
</body>
</html>
JavaScript
$(document).ready(function(){
$("button").click(function(){
alert("Width of element: " + $("#test").width());
});
});