I would like to know, if you have how I present the contents of a div at a given time. Well, in this case I'm inserting an html into the div and after a while I'd like it to disappear, have you any way to do that?
<div id="alerta">
</div>
@if (cadastradoComSucesso)
{
<script>
var functionSuccess = function () {
$('#alerta').html('<div class="alert alert-success" role="alert"> Registro cadastrado com sucesso.</div>')
};
setTimeout(functionSuccess, 8000);
</script>
}
else
{
<script>
var functionWarrning = function () {
$('#alerta').html('<div class="alert alert-warning" role="alert"> Erro ao salvar registro.</div>')
};
setTimeout(functionWarrning, 8000);
</script>
}