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.
Existing answers did not work for me i just used $('.confirm').hide(). and it worked for me.
$('.confirm').hide()
success: function(res) { $('.confirm').hide() swal("Deleted!", "Successfully deleted", "success") setTimeout(function(){ window.location = res.redirect_url; },700);