title: Putting JavaScript code in a separate file does not work
body: <p>I am working with Optimizely guiders.js example code:</p>
  
  <p><a href="http://jeffpickhardt.com/guiders/" rel="nofollow">http://jeffpickhardt.com/guiders/</a></p>
  
  <p>Though if I extract the JavaScript code and place it in a separate file, the guiders do not load.</p>
  
  <p>Here is the edited HTML:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
  
      &lt;!-- guider.js requires jQuery as a prerequisite. Be sure to load guider.js AFTER jQuery. --&gt;
      &lt;script type="text/javascript" src="jquery-1.5.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="guider.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="guidedTour.js"&gt;&lt;/script&gt;
  
      &lt;link rel="stylesheet" href="guider.css" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;span id="clock" style="border: 2px solid #333; width: 300px; height: 200px; text-align: center;" onclick="guider.next();"&gt;
        &lt;br /&gt;
        &lt;img src="clock.gif" width=150 height=150 /&gt;
      &lt;/span&gt;
  
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have all the JavaScript code in <code>guidedTour.js</code>, in the same directory.
  All <code>.js</code> files are also in same directory. And the code worked before extracting it in separate file.</p>
  
  <p>The guiders do not load when JavaScript is in separate file.</p>
  
  <p>I am getting the following error in Chrome:</p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot read property 'clientHeight' of null
    jquery-1.5.1.min.js:16"</p>
  </blockquote>
  
  <p>Trying a more recent version of jQuery throws an error on <code>guiders.js</code>.
  Anyway it seems a different behavior than if I keep the JavaScript code in the <code>index.html</code>.</p>
  
  <hr>
  
  <p>I have created a jsfiddle for the working code:
  <a href="http://jsfiddle.net/vpMQy/" rel="nofollow">http://jsfiddle.net/vpMQy/</a></p>
  
  <p>I do not know how to create a similar jsfiddle with the JavaScript in a separate file so that I can reproduce the problem.</p>
  
  <p>Is it possible to put this JavaScript code in a separate file?</p>