call modal from a div code example Example: call function on modal open $('#myModal').on('shown.bs.modal', function (e) { // do something... })