JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<button onclick="run()">Run example</button>
</body>
JavaScript
function ajax(varia) {
return $.ajax({
dataType: "html",
async: false,
type: 'POST',
url: '/echo/html/',
data: {
html: '<p id="login" style="display:none">Test HTML</p>',
delay: 1
}
});
}
function run() {
ajax("login").done(function (data) {
$("body").prepend(data);
// The #login have atribute style="display: none;"
$("#login").fadeIn(500);
});
}