I am using bootstrap-modal.js v2.3.2
Whenever I close the model basically it toggles the modal, meaning previous data persists.
What I'd like is for:
- Every time I close or hide the modal, it should destroy its data.
- Every time I open the modal, it should create a new instance.
I tried something like :
$('#update-addresstype').on('hidden.bs.modal', function () {
$(this).data('modal', null);
})
But it does not seems to be working.