title: jQuery script not working when page viewed on localhost
body: <p>I'm just starting to playing around on a Mac for the first time and I have created a very simple HTML page that uses jQuery to do a simple text swap when an h1 tag is clicked. </p>
  
  <p>When I don't view the page through the webserver and just open it directly in Safari (file:///Applications/xampp/xamppfiles/htdocs/test/mypage.html) it works as expected. However, when I try to view through Apache (<a href="http://localhost/test/mypage.html" rel="nofollow noreferrer">http://localhost/test/mypage.html</a>) it doesn't work. </p>
  
  <p><strong>Here's the code</strong>:</p>
  
  <pre><code>&lt;html&gt;  
      &lt;head&gt;  
          &lt;title&gt;My Awesome Page&lt;/title&gt;  
          &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;  
          &lt;script type="text/javascript" charset="utf-8"&gt;  
              function sayHello()  
              {   $('#foo').text('Hi there!');  
              }  
          &lt;/script&gt;  
      &lt;/head&gt;  
      &lt;body&gt;  
          &lt;h1 id="foo" onclick="sayHello()"&gt;Click me!&lt;/h1&gt;  
      &lt;/body&gt;  
  &lt;/html&gt;
  </code></pre>
  
  <p>Am I missing something on the Mac? Wouldn't be an Apache setting since its client-side code.. right?</p>
  
  <p>I should probably also mention that I loaded XAMPP to run Apache and MySQL. I have tested Apache to ensure its working using a simple PHP file.</p>
  
  <p>Steve</p>