Bootstrap modal 'loaded' event on remote fragment

前端 未结 5 778
醉酒成梦
醉酒成梦 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:15

    Just an update here:

    Bootstrap has added a loaded event.

    http://getbootstrap.com/javascript/#modals

    capture the 'loaded.bs.modal' event on the modal

    $('#myModal').on('loaded.bs.modal', function (e) {
      // do cool stuff here all day… no need to change bootstrap
    })
    

提交回复
热议问题