I have a prototype code that fires on a “load” event:
Event.observe($(imageEl), 'load', this.someFunction.bind(this));
When I create a 'Real' event using jQuery code, like
jQuery(...imageEl selector...).attr("src", filename);
it runs the prototype code (someFunction). Good!
Next, I try to run the Prototype code using the jQuery trigger:
jQuery(...imageEl selector...).trigger('load');
But now nothing happens, i.e. this line does not run the prototype code.
Any idea how to trigger a Prototype event from jQuery?
Sty
source
share