JSFiddle - React, Tailwind, and code Playground

HTML

<div class="mgreen">Lorem ipsum</div>
<div id="ajax-container"></div>
<p><button id="moar-id">Load content</button></p>

CSS

.mgreen{
    background:green;
    width:200px;
    padding:10px;
}

JavaScript

$(document).ready(function(){
				$(document).ajaxComplete(function(event, xhr, settings){
					$(".mgreen").delay(2000).slideUp("fast");
				});
				$('#moar-id').on('click', function(){
					$.post(
						'/echo/html/',
                        {
                            html : 'This text was loaded',
                            delay : 1
                        },
						function(data){
							$('#ajax-container').html(data);
						}
					);
				});
			});