I am trying to customize the default delete confirm popup.I am using this plugin to customize the popup.In plugin,they demonstrated using button onclick.But in my application i am using confirm dialog box inside the javascript function,
Actual sample from plugin
$('#button_2').confirmOn({
questionText: 'This action cannot be undone, are you sure?',
textYes: 'Yes, I\'m sure',
textNo: 'No, I\'m not sure'
},'click', function(e, confirmed) {
if(confirmed) $(this).remove();
});
I tried in the below to customize the confirm dialog,
function deleteFollow(url, obj){
confirmOn({
questionText: 'This action cannot be undone, are you sure?',
textYes: 'Yes, I\'m sure',
textNo: 'No, I\'m not sure'
}, 'click', function(e, confirmed){
if(confirmed)
''''''''''''
ajax post comes here
''''''''''''''''
The above giving the error in console as "Uncaught ReferenceError: confirmOn is not defined
".How to implement or alter the original for my actual function.
your second
confirmOn()
does not have the jQuery prefix:should be:
or: