sweet alert content example
Example 1: switch alert
swal({
title: "Good job!",
text: "You clicked the button!",
icon: "success",
button: "Aww yiss!"
});
Example 2: sweet alert js
swal({
title: "Deleted!",
text: "Your row has been deleted.",
button: "Close",
icon: "success",
timer: 3000,
buttons: {
confirm: {
text: "OK",
value: true,
visible: true,
className: "",
closeModal: true
},
cancel: {
text: "Cancel",
value: false,
visible: true,
className: "",
closeModal: true,
}
}
});
Example 3: change icon in sweet alert
swal({ icon: "error",});