title: jQuery: Can I get a reference to the bound events on an element?
body: <p>I have some elements with a function bound to the <code>click</code> event. I want to bind that same function instead to the <code>mouseover</code> and <code>mouseout</code> events. Is it possible to get a reference to the click event so that I can assign it to those other events? I'm imagining something like this (inside <code>each()</code>):</p>
  
  <pre><code>$(this).bind('mouseover', $(this).click());
  $(this).bind('mouseout', $(this).click());
  $(this).unbind('click');
  </code></pre>
  
  <p><strong>Questions You Might Ask</strong></p>
  
  <p><em>Why don't you just change the code that's binding it to the click event?</em></p>
  
  <p>The JS that's setting this up is part of a Drupal module (<a href="http://drupal.org/project/dhtml_menu" rel="noreferrer">DHTML Menu</a>, if you're curious), so I don't want to change the module code because it will be wiped out when the module is inevitably updated in the future. I'm also using the <code>click</code> handler for other parts of the page - I only want to move it to <code>mouseover</code> and <code>mouseout</code> for one menu.</p>