modal open event jquery code example
Example 1: onclick open modal jquery
$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');
Example 2: call function on modal open
$('#myModal').on('shown.bs.modal', function (e) {
// do something...
})
Example 3: open modal in jqwuery
$("#myModal").modal()
Example 4: jquery works until modal is shown
$(document).on('show.bs.modal', '#reservationModal', function (e) {
console.log('works');
});