Your code does not explain a lot but if I have it correct, the following should work -
The hiding functionality is implemented in the
modal.js in this way. In a javascript just do the following -
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
Basically it's just finding the elements that have the attribute of
data-dismiss and the value of
modal. Upon click it will hide these elements.
Play with these to suit your needs.