JSFiddle - React, Tailwind, and code Playground
by crysfel
HTML
<div id="message" class="hidden msg msg-error">
<p>Lo sentimos pero ha ocurrido un error.</p>
</div>
<button id="btn">Enviar</button>
CSS
.hidden{
display:none;
}
.msg{
padding:5px 20px;
margin:10px 0;
}
.msg-error{
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
JavaScript
$(function(){
$('#btn').click(function(){
$('#message').toggleClass('hidden');
});
})