How to redirect page after click on Ok button on sweet alert?

前端 未结 12 910
别跟我提以往
别跟我提以往 2020-12-10 01:15

I am able to display sweet alert after the page refresh but I have to click on Ok button which I am getting on sweet alert to redirect the page.Please help me in this.

12条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 02:15

    Existing answers did not work for me i just used $('.confirm').hide(). and it worked for me.

    success: function(res) {
    $('.confirm').hide()
    swal("Deleted!", "Successfully deleted", "success")
    setTimeout(function(){
    window.location = res.redirect_url;
    },700);
    

提交回复
热议问题