title: Why MVC Sweet Alert will Auto Close?
body: <p>Below are my coding. Please advise why the sweet alert only pop up not up to 1 second then auto Redirect to another page.</p>
  
  <p>From HTML:</p>
  
  <pre><code>$.ajax({
    url: "/ABC/AddST/",
    data: {
      "username": $("#username").val(),
      "fullname": $("#fullname").val()
    },
    type: "POST"
  }).success(function(data) {
    swal({
      title: "Done!",
      text: "Sales Team was successfully added!",
      type: "success"
    }, function() {
      window.location.href = '/ABC/STList';
    });
  }).error(function(data) {
    swal("Oops", "We couldn't connect to the server!", "error");
  });
  </code></pre>
  
  <p>From Controller:</p>
  
  <pre><code>[HttpPost]
  public ActionResult AddSalesTeam(string username, string fullname)
  {
      var st = new Sales();
  
      if (ModelState.IsValid)
      {
          st.Username = username;
          st.FullName = fullname;
          db.User.Add(st);
          db.SaveChanges();
          return RedirectToAction("SalesTeamList");
      }
      return View();
  }
  </code></pre>