title: Why is jQuery click-event triggered when page loaded?
body: <p>I have the following code....
  When the page is loaded myFunc() is called even if I dont click in my div. Why?
  The function declared "inline" is not triggered...hmmmm........        </p>
  
  <pre><code>&lt;div id="map" style="background: green; height: 100px"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      function myFunc() {
          alert("allways triggered when page loads...");
      };
  
      $(document).ready(function() {
  
      $("#map").click(myFunc());
      $("#map").click(function() { alert("not triggered") });
  
      });
  &lt;/script&gt;
  </code></pre>