Binding And Triggering Native And Custom Events In Prototype
I'm having a bit of issue with events in prototype. I'm trying to bind and fire the native events: onhashchange, and onpopstate. As well as my custom events: statechange and anchor
Solution 1:
You can only use fire for custom events.
Take a look at this question/answer. I think it solves your problem. It's certainly what we use.
Solution 2:
I ended up coming up with this: https://gist.github.com/796871
Which allows a consistent API for custom and standard events.
Post a Comment for "Binding And Triggering Native And Custom Events In Prototype"