How it works
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. For more info, please visit the sweetalert2.github.io
Sweetalert 2 use class with .btn .sa-basic
, .sa-title-text
, .sa-title-error
, .sa-buttons
, .sa-position
, .sa-image
-
A basic message
-
A title with a text under
-
A dialog with three buttons
-
A custom positioned dialog
-
A message with a custom image
-
A message with auto close timer
-
AJAX request example
-
A modal with a title, an error icon, a text, and a footer
<!-- Plugin Js -->
<script src="assets/bundles/sweetalert2.bundle.js"></script>
<!-- Jquery Page Js -->
<script>
document.querySelector(".sa-basic").addEventListener('click', function(){
Swal.fire("Our First Alert");
});
</script>