Cornezuelo del Centeno
Cornezuelo del Centeno

Reputation: 501

bootbox.js callback don't working

On bootbox documentation is stated that:

bootbox.alert(str message, fn callback)

where message = Default button text and callback = callback invoked on dismissal

If I understood that well, the callback function should be executed when the alert is closed, but when I use this code in the form of bootbox.alert("test message", alert("callback")) the callback alert pops up when invoking the bootbox, not on closure. What I'm doing wrong?

Upvotes: 1

Views: 603

Answers (2)

Badr Hari
Badr Hari

Reputation: 8414

bootbox.alert("test message!", function() {
 alert("callback!");
});

Upvotes: 0

iamawebgeek
iamawebgeek

Reputation: 2865

Try this:

bootbox.alert("test msg", function () { alert("callback here"); })

Upvotes: 3

Related Questions