I have a list of Messages I need to show to the User, which are loaded using Ajax after certain periods of time in data.NotificationDtos
The thing is that I have to show one Message at a time for a certain amount of time say 10 seconds,
At the moment it is displaying all notifications at once.
So I need my steps to be:
After Ajax Request toastr first Message with
toastr.info(val.DetailedMessage, val.EventMessage);
Then Show Above Toastr Message for certain time.
- Then continue with other Messages until all are complete.
But I come around how to do that.
function loadNotifications() {
$.ajax({
url: '@Url.Action("GetNotifications", "Users")',
dataType: "json",
success: function (data) {
$.each(data.NotificationDtos, function (i, val) {
toastr.info(val.DetailedMessage, val.EventMessage);
});
}
});
}