title: Why jQuery event not firing when outside ready function, even after document is ready?
body: <p>Why does click event not firing in this case, although DOM appears to be loaded ('ready' shows in the console)?</p>
  
  <pre><code>$(document).ready(function() {
      console.log("ready!");
  });
  
  $("p").click(function() {
      alert("You clicked on paragraph.");
  });
  </code></pre>
  
  <p>My understanding, that because code for click event is after document ready function is correctly executed, it should work, but it doesn't. It will only work when event is included between curly braces in ready function. </p>