This project is a remake of SweetAlert (1) to make basic beautiful alert boxes.
Amazing / basic alert
, confirm
, and prompt
boxes.
The library loads SweetAlert (1) and makes its on custom styles for the alert box.
1-Line code embed with CDNjs.
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Parking-Master/Simple-Alert@latest/simplealert.js"></script>
For the minified version:
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Parking-Master/Simple-Alert@latest/simplealert.min.js"></script>
Read the documentation below to make your amazing alert boxes!
You can also try a live preview before you start.
simple.alert("Your message", function() {
/* Function after "OK" is pressed */
});
simple.confirm("Do you really want to do this?", function() {
/*
* Function after "OK" is pressed.
* If "Cancel" is pressed, the box will close
*/
});
simple.prompt("Enter something:", "", (val) => {
/* "val" is the value from the input. */
});
Try it out!
MIT