Wie überprüfe ich, ob meine CallBackFunction als eine Funktion mit jQuery definiert ist?JQuery überprüfen, ob eine Var eine Funktion ist
var callBackFunction =window['columnActive'];
(...)
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
if ($.isFunction(callBackFunction)) {
alert('cheguei');
columnActive(nRow, aData, iDisplayIndex, iDisplayIndexFull);
}
}
Es ist auf den Test nicht –
Ignorieren Sie die Top-Antwort in dem Duplikat, [diese] (http://stackoverflow.com/a/6000009/519413) sind die richtige Antwort –