0
I made a system that when the user enters the index is displayed a materialize Toast, I need that when the user click on it it is redirected to another page, I tried to do as follows but I was not successful;
<script>
Materialize.toast('Você tem '+retorno+' novas notificação de serviço'+'<div class="material-icons" id="kol">info_outline</div>', 4500, 'blue rounded');
$( ".rounded" ).click(function() {
alert( "teste" );
});
</script>
Try with:
$(document).on("click", ".rounded", function() {
 alert( "teste" );
 });
– Sam
worked, thank you very much
– Reignomo
you know tell me why my code didn’t work ?
– Reignomo
Elements added dynamically uses a different syntax, as I commented above.
– Sam