How to delay display of Bootstrap 3 modal after click

前端 未结 4 1264
情歌与酒
情歌与酒 2020-12-18 04:16

I\'m trying to delay the display of a Bootstrap modal after the user has clicked on a trigger button:

4条回答
  •  醉酒成梦
    2020-12-18 05:02

    If any of those above method does't work, give this method a try. It will work perfectly.

    $(window).ready(function() {
       setTimeout(function(){
           $('#myModal').modal('show');
       }, 2000);
    });
    

提交回复
热议问题