I have several functions that are used to bind events with a div on the page. There MenuHandlers, CalendarHandlers, PopupHandlers ....
So, at the moment I have one function, called BindHandlers, which I call from the document ready function, and which runs all the handler functions one by one.
Is there a one-line solution that says something like “call all functions that have“ handlers ”in their function name?
This is what the function looks like:
function BindHandlers() { MenuHandlers(); CalendarHandlers(); PopupHandlers(); ... 8 more like this }
What I want to replace:
BindHandlers(); // replace that line with the following: "call all the functions that have "Handlers" in their names
Thanks for the suggestions.
source share