I have made a fiddle illustrating the issue I am facing at the moment. So every time I close and open a modal, shown.bs.modal
also fires multiple times. In this fiddle, every time you close and open a modal, number of alerts also increases (when it's supposed to trigger only once). http://jsfiddle.net/j36h2/1/
function openTestModal(){
$('#testModal').modal({
keyboard: false,
backdrop: 'static'
});
$('#testModal').on('shown.bs.modal', function (e) {
alert('');
});
}
$('.testButton').click(function(){
openTestModal();
});