javascript - How to get shown.bs.modal to trigger when the modal uses a remote URL -
the problem i cannot shown.bs.modal fire correctly when modal generated passing in remote url. in following code hidden.bs.modal consistently work. the code $('#my_modal').on("shown.bs.modal", set_up_modal); $('#my_modal').on("hidden.bs.modal", tear_down_modal); $('#my_modal').modal({ remote: target_url }); set_up_modal = function() { console.log('up') }; tear_down_modal = function() { console.log('down') }; what have tried i have read docs . i have tried changing .on read more $('body').on("shown.bs.modal", '#my_modal', saa.set_up_modal); has produced no change (again hidden.bs.modal works). update i have added console.log($._data( $('#my_modal')[0], "events" )); , can confirm shown being bound object, not getting called. i have tried using show.bs.modal instead, works need elements visible on screen want them. found temporary solution p...