Ricardo Barbosa
Ricardo Barbosa

Reputation: 197

Removing darker/grey background from SweetAlert

$( document ).ready(function() {
    Swal.fire({
                              position: 'top-end',
                              title: 'Error!',
                              text: 'Do you want to continue',
                              icon: 'error',
                              confirmButtonText: 'Cool'
                          })
});
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

Is there anyway I can run a sweet alert without getting the background darker while the pop up is on ? Like a Toastr .. I've already tried to do some research and already tried backroundColor but won't work.

Example

Upvotes: 2

Views: 5844

Answers (1)

Ricardo Barbosa
Ricardo Barbosa

Reputation: 197

Adding:backdrop: false, to options solved the problem.

Upvotes: 6

Related Questions