1
I have a div
which can be hidden by clicking a button:
$(".fechar").click(function(){
$("#mensagem").hide();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="mensagem">
<p>(...)</p>
<button class="fechar">Fechar e não mostrar novamente</button>
</div>
What I need is for her not to appear again after being hidden for the first time.
I found a way with the Jquery dialog, but it does not allow me to customize right, at least not in a simple way, so I need and I prefer it to be like this.
How do I memorize this action in localStorage?
But this code you put in already does just that.
– LeAndrade
No, @Leandrade... I need it to be memorized in localStorage so that even if you refresh the page, this div won’t appear again...
– Thiago Soubra
@Thiagosoubra, see my answer on
– Jorge.M
Our truth, I didn’t pay attention!
– LeAndrade