JSFiddle - React, Tailwind, and code Playground
HTML
<script>
alert("Script before element: " + $("table").length);
$(function () {
alert("Script on page ready: " + $("table").length);
});
</script>
<table><tr><td>a</td></tr></table>
<script>
alert("Script after element: " + $("table").length);
</script>