1
When I click the close icon of the error message, the Bootstrap javascript function simply destroys the container #msg
receiving error messages preventing the next time an error occurs the container does not appear with the message because it no longer exists in the first close-up.
...
msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>';
msg += '<strong>Atenção! </strong>Todos os campos precisam ser preenchidos.';
// Verificando se todos os dados foram inseridos
if((username == '' || username == null) ||
(password == '' || password == null)){
$('#msg').empty();
$('#msg').removeClass('hidden').append(msg);
return false;
} else {
...
Question: How can I get around this problem?