I'm doing an application using JavaScript and JQuery, and when I put an alert to display an error in a div, it does not disappear, just by clicking on the x to close, I'd like to know how do I get rid of it after some time.
Código HTML
<div id="erro" class="alert alert-danger alert-dismissible fade show">
<button type="button" class="close" onclick="$('#erro').hide()">×</button>
IP fora da faixa, por favor, digite dois IP's válidos
</div>
Código JavaScript
$("#erro").show();