title: Why does my Selenium command not work?
body: <p>I'm writing a selenium script that should only start testing after all ajax calls have completed.</p>
  
  <p>Several forums have suggested that I use the following condition (in the waitForCondition command):</p>
  
  <pre><code>selenium.browserbot.getCurrentWindow().jQuery.active == 0
  </code></pre>
  
  <p>Unfortunately this keeps throwing an error:</p>
  
  <blockquote>
    <p>jQuery is undefined</p>
  </blockquote>
  
  <p>JQuery is definitely defined on my site. I have also tried substituting the jQuery with $, but get the same error.</p>
  
  <p>Any ideas?</p>