Search code examples
jqueryalertpageloadbootbox

Reload page after click ok button in jquery alert


Following link is the example of which is am faced as issue. I should reload the page when i click ok button. Unless the page should not be reload. I have google for this. Still no result. How to achieve this.

Jsfiddle

 $(function () {
bootbox.alert({
    message: "I'm the first!"
});
location.reload(true);
});

Solution

  • $(function () {
        bootbox.alert({
        message: "I'm the first!",
        callback: function () { location.reload(true); }
    });