JSFiddle - React, Tailwind, and code Playground
HTML
<div onload="$(this).text('Hello world in Div using text()');"></div>
<div onload="hello()"></div>
JavaScript
function hello(){
alert('Hello world! in func hello');
}
$(function(){
$('div[onload]').trigger('onload');
});