[ad_1]
I have this thing. After I refresh the page the script is stop working.
How do I need to do it to be working?
<a onclick="confirmation(event)" href="{{ url('trash/delete/'.$items->id) }}"> Delete</a>
This is the script
<script>
function confirmation(e) {
e.preventDefault();
var url = e.currentTarget.getAttribute('href')
Swal.fire({
icon: 'warning',
title: 'Are you sure?',
text: 'This action cannot be undone!',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, recall!'
}).then((result) => {
if (result.value) {
window.location.href=url;
}
})
}
</script>
i have try this : location.reload(); in multilocation, but not working
[ad_2]