on modal hidden bootsrap code example Example: bootstrap on hidden bs modal $('#myModal').on('hidden.bs.modal', function (e) { // do something... })