title: JavaScript onClick work only after second click
body: <p>I found another similar questios, but almost all is for advanced things, like Android development. My question is simple, I think. I have this two codes:</p>
  
  <pre><code>function toggle(d)
  {
      var o=document.getElementById(d);
      o.style.display=(o.style.display=='none')?'block':'none';
  }
  </code></pre>
  
  <p>And in another file, I got that:</p>
  
  <pre><code>&lt;a href="javascript:;" onmouseover="toggle('maisinfo');"&gt;More Info &lt;/a&gt;
  </code></pre>
  
  <p>When I click on got the  mouseover (second code), it just work after second try.</p>
  
  <p>Anyone know where is the problem?</p>
  
  <p>Obs.: The first code is in the header.php and the second on single.php (WORDPRESS)</p>