xxxxxxxxxx
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>swal("My title", "My description", "success");</script>
xxxxxxxxxx
swal({
title: "Good job!",
text: "You clicked the button!",
icon: "success",
button: "Aww yiss!",
});
xxxxxxxxxx
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
timer: 1500
})
xxxxxxxxxx
Swal.fire({
icon: 'error',
title: 'Oops...',
text: 'Something went wrong!',
})
xxxxxxxxxx
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
timer: 1500
})
xxxxxxxxxx
Swal.fire({
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
timer: 1500
})
xxxxxxxxxx
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, delete it!'
})
xxxxxxxxxx
<head>
<script src="jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
</head>
<?php
echo '
<script type="text/javascript">
$(document).ready(function(){
swal({
position: "top-end",
type: "success",
title: "Your work has been saved",
showConfirmButton: false,
timer: 1500
})
});
</script>
';
?>