title: TypeError: Object #<HTMLDivElement> has no method 'fadeTo'
body: <p>I am trying to fade a div using this code:</p>
  
  <p>Javascript:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
    function show(id) {
      //document.getElementsByName(id)[0].style.visibility = "visible";
      document.getElementsByName(id)[0].fadeTo( "slow", 0.5 );
    }
    function hide(id) {
      document.getElementsByName(id)[0].style.visibility = "hidden";
    }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;div style="width: 80px; height: 20px; background-color: red;" onmouseover="show('hej')" onmouseout="hide('hej')"&gt;
     &lt;div id="div1" Name="hej" class="hej"&gt;Text&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have included:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And I get the error "TypeError: Object # has no method 'fadeTo' ".
  Anyone who can help with fixing this and explain why it doesn't work?</p>