bootstrap modal close after 4 seconds or user click

前端 未结 4 1997
梦谈多话
梦谈多话 2020-12-24 14:49

How would I set a timeout for a bootstrap modal? After getting the ajax data back that the message returned by php contains the term success, I want to give the

4条回答
  •  既然无缘
    2020-12-24 15:22

    $('#submit1').click(function(){
            setTimeout("$('#myModal').modal('hide');",3000);
        });
    

    this is working for popup delaying 3 seconds in closing. please check with the $('#submit1') for this click I have written the code.

提交回复
热议问题