how can i run a function before oper a modal? _ code example
Example 1: call function on modal open
$('#myModal').on('shown.bs.modal', function (e) {
// do something...
})
Example 2: jquery works until modal is shown
$(document).on('show.bs.modal', '#reservationModal', function (e) {
console.log('works');
});