title: jQuery onclick function needs a double click to initiate
body: <p>I have a code snippet that's present twice on a node in drupal.</p>
  
  <pre><code>&lt;a class="btn" href="http://#" onclick="jQuery(\'#login-form-holder\').slideToggle(200); return false;" &gt;
  </code></pre>
  
  <p>I've been having a headache regarding that this snippet in one place needs only a normal click to initiate the slideToggle while the other one you have to click twice within the 200 ms timer for it to toggle.</p>
  
  <p>What I'm wondering is what's causing it to require getting clicked twice within the time span and what a possible fix might be?</p>
  
  <p>----EDIT----</p>
  
  <pre><code>$commentlogin = '&lt;div class="test"&gt;&lt;a class="btn" href="http://#" onclick="jQuery(\'#login-form-holder\').slideToggle(200); return false;" &gt;Log In&lt;/a&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>Code that the drupal module uses to build up the whole commenting section.</p>
  
  <p>-------UPDATE--------</p>
  
  <p>The problem has been fixed, there was hidden in the code and event.stopPropagation that was watching for clicks outside certain elements to close the form, I needed to add the ID for this button to that list and the problem was fixed.</p>