Typically, I can pass an event to an anonymous Jquery function like so:
$(".click_me").on("click", function(e) {
e.preventDefault();
});
Now let's say I remove the anonymous function but still want to pass the event to it:
function onClickMe(e){
e.preventDefault();
}
$(".click_me").on("click", onClickMe(e));
Unfortunately, this doesn't work as expected. I get this error:
ReferenceError: e is not defined
So how else can I pass the event to an external function?