Getting started
Installation
Download
Download the Latest version and use files in the /dist/
folder.
via CDN:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script>
via Bower:
Simply copy these links
$ bower install craftpip/jquery-confirm
via Npm:
$ npm install jquery-confirm
Dependencies:
- Bootstrap by Twitter >= v3 (optional, if you want to use responsive layouts)
- jQuery library > v1.8
Script.blade Example :
function confirmDelete(url, title = "Do You Want To Delete This Data?") {
$.confirm({
title: 'Are You Sure?',
content: title,
autoClose: 'cancel|8000',
type: 'red',
theme : 'material',
typeAnimated: true,
buttons: {
'Yes, Delete It': function () {
window.location.href = url;
},
cancel: function () {
alertWarning('Category Deleted Cancelled');
}
}
});
}
Table Delete Action
<a href="javascript:void(0)"
onclick="confirmDelete('{{ route('categories.delete', $category->id) }}','Do you want to delete this category - {{ $category->name }}?')"
class="btn btn-outline-danger btn-sm"> <i class="fa-solid fa-trash"></i>
</a>
More Info : jquery-confirm.js | The multipurpose alert & confirm (craftpip.github.io)