support callback function after timer

swal({
    title: "foo succesful!",
    type: "success",
    timer: 2000
},
function(){
  // reload page after swal-dialog closes
  location.reload();
});