Bootstrap modal 'loaded' event on remote fragment

前端 未结 5 784
醉酒成梦
醉酒成梦 2021-02-07 04:26

I\'m currently using Twitter Bootstrap modal component and i have an issue where I use jquery validation plugin on input fields in the content I load remotely using the data-rem

5条回答
  •  一生所求
    2021-02-07 05:08

    The 'loaded.bs.modal' event doesn't work for me, so I have tried the 'shown.bs.modal' event and it's works fine :

    $('#myModal').on('shown.bs.modal', function () {
       // do cool stuff here...
    });
    

    This event is captured after the modal is shown.

    I hope this will help someone :)

提交回复
热议问题