", type: "error"," /> ", type: "error"," /> ", type: "error","/>

Noty not display message after some clicks

257 Views Asked by At

I'm using noty https://ned.im/noty/

This is my code:

<script>
function showNoty() {
var n = new Noty({
        text: "<?php echo $message; ?>",
        type: "error", 
        layout: "top",
        theme:"sunset",
        container: "#content",
        closeWith:[]
    });
    n.show();
}
showNoty();
</script>

Problem:

Everything works great until do the 6th click on button to display the message. So, i can do 5 clicks and shows the message correctly, on the +6 click doesn't work anymore.

Someone can give some tips? Thank you!

1

There are 1 best solutions below

0
Juan.Queiroz On BEST ANSWER

I need to use static method (https://ned.im/noty/#/api?id=api-static-methods)

I solved the problem with:

Noty.setMaxVisible(10);

Thank you all!