JSFiddle - React, Tailwind, and code Playground
by tuga
HTML
<div id="status"></div>
JavaScript
var newresp = "success";
if(newresp == "success")
{
var newmsg="<img src='http://i.stack.imgur.com/kG1gQ.jpg?s=24&g=1'><span style='color:#00CCFF;font-size:25px;margin-top:2px'> validated!</span>";
var newmsg1="redirecting ......";
//$('#status').fadeIn(1000).html(newmsg).fadeOut(2000);
$( "#status" ).hide().fadeIn( 2000 ).html(newmsg).delay( 1500 ).fadeOut( 1000 );
$('#status').hide().fadeIn(2000).html(newmsg1).delay( 1500 ).fadeOut(2000);
// i want to hide this newmsg now and then show the newmsg1
};