Ramco Ramco

Ramco Ramco

  • 424
  • 3.4k
  • 490.9k

Custom Message Popup

Aug 20 2024 5:19 AM

hi

  How to create a custom message box. Title,message, O.k button using below code. Line should appear after Title. It should be defined  at one place

<script type="text/javascript">

    var swalInit = swal.mixin({
        buttonsStyling: false,
        confirmButtonClass: 'btn btn-primary',
        cancelButtonClass: 'btn btn-light'
    });

    function ShowPopup(heading, body, type) {
        swalInit.fire({
            title: heading,
            text: body,
            type: type,
            position: 'top',
            allowOutsideClick: false,
            timer: 6000
        });
    }
}

Thanks


Answers (1)