JSFiddle - React, Tailwind, and code Playground
HTML
<button>test</button>
<div></div>
JavaScript
$('button').click(function(){
$('div').text('data');
});
$('button').click(function(){
alert($('div').text());
});
<button>test</button>
<div></div>
$('button').click(function(){
$('div').text('data');
});
$('button').click(function(){
alert($('div').text());
});