Skip to content
Advertisement

Bootstrap Notify Duplicate Notifications After Consequent AJAX Calls

I’m using the most recent release of Bootstrap Notify (v3.1.5) to show status messages after an AJAX call. It works as expected in the first call. After the first execution, every time the notify is called, its shows the previous notifications message.

Example:

1st call = 1 Notify message; 2nd call = 2 Notify messages; 3rd call = 3 Notify messages; …

Bootstrap Notify Initialisation:

$.notify({
    icon: icon,
    title: title,
    message: message
}, {
    type: type,
    allow_dismiss: true,
    newest_on_top: false,
    placement: {
        from: "top",
        align: "right"
    },
    offset: 20,
    spacing: 10,
    z_index: 100000,
    delay: delay,
    timer: 1000,
    mouse_over: true,
    animate: {
        enter: 'animated fadeInDown',
        exit: 'animated fadeOutUp'
    }
});

How can i solve this issue?

Advertisement

Answer

Solved my issue. After some debugging i realized that the event was being triggered multiple times and that cause the notifications to pop up repeatedly. Really big rookie mistake…

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement