bootstrap jquery show.bs.modal event won't fire

前端 未结 19 2279
小蘑菇
小蘑菇 2020-11-28 07:29

i\'m using the modal example from the bootstrap 3 docs. the modal works. however i need to access the show.bs.modal event when it fires. for now i\'m just trying:



        
相关标签:
19条回答
  • 2020-11-28 08:04

    Try this

    $('#myModal').on('shown.bs.modal', function () {
       alert('hi');
    });
    

    Using shown instead of show also make sure you have your semi colons at the end of your function and alert.

    0 讨论(0)
提交回复
热议问题