title: Javascript - Clicking Span with Class
body: <p>From I understand this is supposed to be quite simple, yet I'm getting an error while doing it. I have website a button with different span's within the button, the spans change using Jquery once they're clicked apon. Using Firebug, I'm trying to see that my click method works on the first span text, yet for some reason I'm getting the following error. What am I doing wrong? (Note, latest Jquery is being used on the page)</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;button id="signup_forms_submit" class="chrome big on_dark signup_forms_submit touchy blue"&gt;
          &lt;span class="account_btn"&gt;Start&lt;/span&gt;
          &lt;span class="birthday_btn"&gt;Next&lt;/span&gt;
          &lt;span class="captcha_btn"&gt;&lt;span&gt;&lt;b&gt;Almost&lt;/b&gt; &lt;b&gt;Done!&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class="login_btn"&gt;Log in&lt;/span&gt;
      &lt;/button&gt;
  </code></pre>
  
  <p><strong>Jquery Command:</strong></p>
  
  <pre><code>$('.account_btn').click();
  </code></pre>
  
  <p><strong>Firebug Console Log:</strong></p>
  
  <pre><code>TypeError: $(...) is null
  
  $('.account_btn').click();
  </code></pre>