Using jQuery I'm trying to set an eventhandler int...
# javascript
t
Using jQuery I'm trying to set an eventhandler intercepting the submit event of a form. But when it's called an error is thrown: "apply is not a function". That's true, the EventHandler only has a invoke method. Anyone had luck with this?
j
I had a similar error recently in actual javascript, and it was that I forgot the syntax to pass a function in as a parameter in another function.
Copy code
JavaScript

dowork(onThisItem, () => {
   toggleVisibilityWithSpeed(1);
})

function doWork(on, options) {
  if (on == "123") {
    options();
  }
}
I’m not a web guy but I happened to have that issue when I was playing around in javascript. With that said you probably need work on your function call in Kotlin. Can you paste what you wrote? The function and the call to it?