It seems that if an event handler is bound to an element through the bind()
call, it won't be available when using the element.onXXX attributes. So if I
do:
$('#myEle').bind('click', function(){
  // do something
});
the myEle.onclick is still undefined. I also tried the
$('#myEle').attr('click') and it's not there. So how can I get the reference
to this function then?


The reason is that a plugin I used registered a click handler on the
element, and I need to do something before that click handler runs. I tried
to bind another click handler on the element but my handler runs after the
plugin's handler so that didn't work (is there anyway you can change the
order of handlers?).
What I am trying to do now is to save a reference of the plugin's handler,
unbind it, add my handler which will do my stuff then invoke the plugin's
handler. But I can't seem to be able to get the reference of the plugin's
handler since it is registered through the bind() call.

Any ideas?

Thanks,

Reply via email to