title: Javascript not working and disappearing on refresh
body: <p>I am trying to make a Tic Tac Toe game, but i have a problem with the javascript part of it- the script doesn't work, and when i refresh the page and check in Firebug- it has disappeared entirely- Firebug says no script on page. I am trying to make the image with the appropriate symbol- O or X- to appear on the screen when clicked on, but all i have is failure at this point. Here is the HTML: </p>
  
  <pre><code>&lt;head&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title&gt;Tic Tac Toe&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="StyleSheet1.css" /&gt;
  &lt;script type="text/javascript" src="Script1.js"&gt;&lt;/script&gt; 
  &lt;/head&gt;
     &lt;body&gt;
        &lt;div id="grid"&gt;
            &lt;div id="oneOne"&gt;
            &lt;a id="buttonShow" href="#"&gt;&lt;img src="Pictures/oSymbol.png" id="theImage" /&gt;
            &lt;img src="Pictures/xSymbol.png" /&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The CSS: </p>
  
  <pre><code>img {
  position:absolute;
  margin:0px;
  top: 3px;
  left: 3px;
  }
  #theImage {
  visibility:hidden;
  }
  </code></pre>
  
  <p>And the Javascript: </p>
  
  <pre><code>$(function () {
      document.getElementById("buttonShow").onclick = function () {
          document.getElementById("theImage").style.visibility = 'visible';
      }
  });
  </code></pre>