I have this code
(function ($) {
$.fn.Val_Rev2 = function (containerId) {
let container = document.getElementById(containerId);
let allFields = container.querySelectorAll("[is-required]");
let errorList = [];
// A bunch of other code....
function PrintErrorSummary() {
// Do stuff
}
}
}(jQuery));
and I can access the Val_Rev2 by doing
$(this).Val_Rev2("container");
I don't know how to access PrintErrorSummary() and I need to on a button click event so I can see errorList that gets populated from other code in the Val_Rev2
I could just pass in another id for a button and bind an event to that so I can access the errorList, but would like to know of any other ways to access the PrintErrorSummary
I tried...