title: Execute Jquery every time a specific function runs
body: <p><strong>Is it possible to execute something every time a specific function runs without any knowledge about that function besides its name?</strong></p>
  
  <p>This would be similar to <code>bind</code></p>
  
  <pre><code>var clicked = 0;
  $('#foo').bind('click',function(){
      clicked += 1;
      alert(clicked);
  });
  </code></pre>
  
  <p>So there, every time something with the ID <code>foo</code> is clicked, it will add 1 to the variable <code>clicked</code> so that I know how many times it has been clicked. What I want to do would be the equivalent of the following if it were correct syntax:</p>
  
  <pre><code>var fired = 0;
  $('my_function').bind('run',function(){
          fired += 1;
          alert(fired);
  });
  </code></pre>
  
  <p>I don't care if in any given situation you would be in, you would always be able to figure something out about the function and use that, I don't want work arounds, this is what I want for an answer:</p>
  
  <p>How I can execute something everytime a specific function runs, just given the name of the function. If that is not possible, why not?</p>