I trying to invoke a public method of my jquery widget api from a form.submit but I'm having no success. Can anyone help me?
_cleanFormFields: function() {
console.log("ok");
},
_addFormListener: function(map, marker) {
var form = $(".add-form").clone().show();
form.submit(function (event){
event.preventDefault();
_cleanFormFields();
}
}
Why this does not work?? The browser's console raises "Uncaught ReferenceError: _cleanFormFields is not defined" exception