jquery i want sweet alert to work first to change the check value to true what should i do?

$("#our-table").on('click', '#button-delete', function () {

var check = null;


Swal.fire({

title: 'Are you sure ?',

icon: 'warning',

showCancelButton: true,

confirmButtonColor: '#3085d6',

cancelButtonColor: '#d33',

confirmButtonText: 'Comfirm'

}).then((result) => {

if (result.isConfirmed) {

check = true

}

})


if (check == true) { // it skips to do this part first

return true;

}

else {

return false;

}

});

สล็อต Slot สมาชิกสล็อตออนไลน์

P.S. I've never studied javascript or jquery before, so I've been studying it on YouTube all the time.


1 Reply

KR Keerthana Rajendran Syncfusion Team July 22, 2021 06:15 AM UTC

Hi Sloter, 
 
Thanks for contacting Syncfusion support.  
 
We checked with the provided code. We noticed that the code doesn’t have any Syncfusion components and a similar query had been addressed in general forums. We request you to follow the below blog for general queries.  
 
 
We would also like to let you know that we have a similar Dialog component with Syncfusion and we request you to have a glance on the following UG and demo links.   
 
EJ1(jQuery dependent): 
 
 
 
EJ2(JavaScript): 
 
 
 
Please get back to us if you need any further assistance with Syncfusion components.  
 
Regards,  
Keerthana R.  


Loader.
Up arrow icon