JSFiddle - React, Tailwind, and code Playground
by inser
HTML
<input type='text' />
<input type='button' value='test' />
<input type='submit' />
<select type='select'><option>Test</option></select>
<a href='/'>Test</a>
<button id="content">Get Content()</button>
JavaScript
$('#content').click(function() {
showContent(function(c) { console.log(c); });
});
function showContent(callback) {
getAsyncContent(1, callback);
}
function getAsyncContent(delay, callback) {
setTimeout(delay, function() {
console.log('test', content());
callback(content());
});
}
function content() {
return "This is content";
}