Introduction

Sweetalert 2

A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. For more info, please visit the plugin's site

Sweetalert 2 use class with .btn .sa-basic, .sa-title-text, .sa-title-error, .sa-buttons, .sa-position, .sa-image

<!-- 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>
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