0
How can I click the div and stop displaying it? I’m using onClick but it’s not running.
My div:
<div class='alert alert-danger aviso' role='alert' style='width: 20%;'>Falha ao carregar os dados!</div>
onClick:
$('.aviso').on("click", function () {
$('.aviso').hide();
}
Is there an error in the console? And please elaborate a [mcve] of your problem using the site’s snippet (button
</>
of the editor).– Woss
Cannot hide pq missing closing function with the ) after the }. Probably if you open the console (F12) see the error printed on it.
– LeAndrade