title: Is this one of the downsides of unobtrusive javascript?
body: <p>Adding inline javascripts to the html tags (e.g. onclick, onsubmit...etc) is considered bad practice.</p>
  
  <pre><code>&lt;form id="form1" onsubmit="return validate();"&gt;
  ...
  &lt;/form&gt;
  &lt;a id="link1" href="http://www.google.com/" onclick="return popup();"&gt;Link1&lt;/a&gt;
  </code></pre>
  
  <p>But if we do it like below, is this possible that the <code>validate</code> or <code>popup</code> function does not get called because the user interacts with the page before the dom ready function is called?</p>
  
  <pre><code>&lt;form id="form1"&gt;
  ...
  &lt;/form&gt;
  &lt;a id="link1" href="http://www.google.com/"&gt;Link1&lt;/a&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(
      function(){
          $('#form1').submit(
              //validate
              function(){...}
          );
          $('#link1').click(
              //popup
              function(){...}
          );
      }
  );
  &lt;/script&gt;
  </code></pre>