title: JavaScript function executing too soon
body: <p>In the example below, <code>myFonk</code> is called instantly; it doesn't wait for the click event. Why not?</p>
  
  <pre><code>    function myFonk(info) {
          $("#result").html(info);
      }
  
      function getText(text) {
          return function () {
              myFonk(text);
          }
      }
  
      $(document).ready(function () {
          $("#b1").click(getText("getText"));
          $("#b2").click(myFonk("myFonk"));
      });
  </code></pre>