Refresh page after bootstrap modal close

23,564

Solution 1

You can refresh current page after you close modal by this:

$('#modal1').on('hide', function() {
window.location.reload();
});

Solution 2

Refresh page using location.reload();

$('#myModal').on('hidden.bs.modal', function () { 
    location.reload();
});
Share:
23,564
Admin
Author by

Admin

Updated on July 07, 2020

Comments

  • Admin
    Admin almost 4 years

    I am trying to refresh my current page after I close bootstrap modal.

    $('#modal1').on('hide', function() {
    window.location.href = 'current-page.php';
    })
    

    Is there a way for refresh current page after closing modal.