Jak používat sweetalert

Příklady kódu

1
0

sladké upozornění 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,
        }
      }
     });
0
0

přepnout upozornění

swal({
	title: "Good job!",
	text: "You clicked the button!",
	icon: "success",
	button: "Aww yiss!"
});
0
0

jquery sladké popup

$.sweetModal.prompt('Can I haz cheezeburger?', 'Can I?', 'Nope', function(val) {
	$.sweetModal('You typed: ' + val);
});
-1
0

jak používat sweetalert

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
-1
0

sweetalert

swal({  title: "Are you sure?",  text: "Once deleted, you will not be able to recover this imaginary file!",  icon: "warning",  buttons: true,  dangerMode: true,}).then((willDelete) => {  if (willDelete) {    swal("Poof! Your imaginary file has been deleted!", {      icon: "success",    });  } else {    swal("Your imaginary file is safe!");  }});

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................