[Solved]-Refresh parent page after closing modal

16👍

Try this.

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

14👍

I assume that you are using Twitter Bootstrap

Bootstrap 3

$('#cart').on('hidden.bs.modal', function () {
    window.location.reload(true);
})

Bootstrap 2.3.2

$('#cart').on('hidden', function () {
   window.location.reload(true);
})

5👍

As far as I can tell, jquery.loadmodal.js has bootstrap.js as a dependency, so its modals are still subject to bootstrap’s methods.

In that case, you can simply bind to hidden.bs.modal

...
$('#yourModal').on('hidden.bs.modal', function () {
    location.reload();
});
...
👤couzzi

0👍

Where you open the nyroModal window, just add this callback function:

 callbacks: {
       afterClose: function() {
              window.location.reload();
            }
        }

Leave a comment