i want to make a confirmation before delete some data so how can i make it using jquery?
$('#deleteBtn').click(function() {
if(confirm("Are you sure?")) {
//delete here
}
});
One possibility is to use the javascript confirm function.
$(function() {
$('#someLink').click(function() {
return confirm('Are you sure you want to delete this item?');
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With