Привіт! потрібна підказка по JS:
Є функція:
function notificationPopup(response, okFunction=null) {
$.confirm({
title: response.result,
type: response.result == 'Error' ? 'red' : 'green',
// content: 'Access Code successfully created and can be managed on "Access codes" tab',
content: response.message,
typeAnimated: true,
buttons: {
Ok: function() {
if (okFunction) {
okFunction();
}
}
}
});
}
Задача: передати «okFunction» але виконати лише в тому місці де викликається okFunction();