0
How do I, according to the code below, the notification appears only once at each access?
<script src="assets/plugins/notification/js/bootstrap-growl.min.js"></script>
<script>
'use strict';
$(window).on('load',function(){
function notify(message, type){
$.growl({
message: message
},{
type: type,
allow_dismiss: false,
label: 'Cancel',
className: 'btn-xs btn-warning',
placement: {
from: 'top',
align: 'right'
},
spacing: 10,
z_index: 999999,
delay: 10000,
animate: {
enter: 'animated fadeInRight',
exit: 'animated fadeOutRight'
}
});
};
notify('<span style="color: #000;font-size: 14px; font-weight: bold">ENVIAR MENSAGEM HOJE</span> <button type="button" class="close" data-growl="dismiss"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>', 'warning');
});
</script>
Experimented
sessionStorage
?– Guilherme Nascimento
Hello William, I don’t get a lot of Jquery. How could I apply sessionStorage to this code?
– user24136
sessionStorage is not jQuery => https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
– Guilherme Nascimento