jQuery and Prototype events

前端 未结 1 921
既然无缘
既然无缘 2021-01-19 04:54

I have a Prototype code that is triggered upon \'load\' event:

  Event.observe($(imageEl), \'load\', this.someFunction.bind(this));

When I

相关标签:
1条回答
  • 2021-01-19 05:08

    You should call your handler directly passing required arguments or trigger the native DOM event.

    NOTE: prototype's fire and jquery's trigger create custom events, not native.

    Read the following answers on how to trigger native events:

    • trigger-an-event-with-prototype
    • javascript-event-that-fires-without-user-interaction
    0 讨论(0)
提交回复
热议问题