I need a implementation of http://www.prototypejs.org/api/event/observe in Jquery? With "frequency" too?
I need to a ticket for cakephp.
Thanks, Celso.
Prototype observe is equivalent to jquery bind
so something like this in prototype:
$('myElement').observe('click', function(){...});
would be equivalent to this in jquery:
$('#myElement').bind('click', function(){...});
The actual implementation in the library is different, but this will provide a similar result. Also, in jquery you won't have to attach a bind() function on the end of your handler as jquery binds the scope automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With