Call back function in modal of bootstrap3

后端 未结 5 1123
醉话见心
醉话见心 2020-12-31 01:12

Im a little bit confuse about firing a call back function in javascript modal of bootstrap3. In normal jquery.post you can do it like,

$.post(\         


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 01:26

    Just a little to add for the 1st answer, it is because when the callback is triggered the DOM inside the modal is not completely loaded yet, perhaps should do a little hack here to holdback the action after callback for a while. Hope it helps!

    $('#myModal').on('show.bs.modal', function (e) {
        setTimeout(function(){
            // something here
        }, 300);
    });
    

提交回复
热议问题