You can use belw code for show and hide bootstrap model.
$('#my-model').on('shown.bs.modal', function (e) {
// do something here...
})
and if you want to hide model then you can use below code.
$('#my-model').on('hidden.bs.modal', function() {
// do something here...
});
I hope this answer is useful for your project.