Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am using toastr, but the popup stays not even for 1 second and dissapear then, how to show the message for a period for 3 seconds? THank you:

C#
$(document).ready(function () {
           toastr.options = {
               "closeButton": false,
               "debug": false,
               "positionClass": "toast-bottom-full-width",
               "onclick": null,
               "showDuration": "300000",
               "hideDuration": "1000",
               "timeOut": "8000",
               "extendedTimeOut": "1000",
               "showEasing": "swing",
               "hideEasing": "linear",
               "showMethod": "fadeIn",
               "hideMethod": "fadeOut"
           };
           $('#toastr-success').click(function () {
               toastr.success('This is a success notification from toastr.')
           });

           $('#toastr-info').click(function () {
               toastr.info('This is an information notification provided by toastr.')
           });

           $('#toastr-warning').click(function () {
               toastr.warning('This is a warning notification provided by toastr.')
           });

           $('#toastr-error').click(function () {
               toastr.error('This is an error notification provided by toastr.')
           });
       });
Posted
Comments
ZurdoDev 9-Mar-15 16:26pm    
Timeout is actually how long it will show.

http://codeseven.github.io/toastr/demo.html

showDuration is how long the animation takes. Your's is way longer than the timeout so my guess is you got some weird situation going on.
[no name] 9-Mar-15 16:34pm    
Even if I am using that example, it shows and hides directly, less then one second
Sergey Alexandrovich Kryukov 9-Mar-15 17:41pm    
Why? why?!
—SA
[no name] 9-Mar-15 18:05pm    
Sergey, you oke?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900