Answers for "how to use sweetalert"

5

Sweetalert

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>swal("My title", "My description", "success");</script>
Posted by: Guest on May-22-2021
0

switch alert

swal({
	title: "Good job!",
	text: "You clicked the button!",
	icon: "success",
	button: "Aww yiss!"
});
Posted by: Guest on May-20-2020
1

sweet alert js

swal({
     title: "Deleted!",
     text: "Your row has been deleted.",
     button: "Close", // Text on button
     icon: "success", //built in icons: success, warning, error, info
     timer: 3000, //timeOut for auto-close
      buttons: {
        confirm: {
          text: "OK",
          value: true,
          visible: true,
          className: "",
          closeModal: true
        },
        cancel: {
          text: "Cancel",
          value: false,
          visible: true,
          className: "",
          closeModal: true,
        }
      }
     });
Posted by: Guest on May-17-2020
0

jquery sweet popup

$.sweetModal.prompt('Can I haz cheezeburger?', 'Can I?', 'Nope', function(val) {
	$.sweetModal('You typed: ' + val);
});
Posted by: Guest on August-08-2020
0

sweetalert js full code

<script>
  // when window loades this alert pop ups 
        swal({
      text: "Hello world!",
           }     );
    </script>
Posted by: Guest on July-04-2021
-1

sweet alert

swal("Good job!", "You clicked the button!", "success");
Posted by: Guest on November-26-2020

Browse Popular Code Answers by Language