title: Using jQuery in Java - unknown error: $ is not defined
body: <p>I try to use the following script code in my Java/Selenium function:</p>
  
  <pre><code>return ((JavascriptExecutor)driver).executeScript("return $(':animated').length").toString().equals("0");
  </code></pre>
  
  <p>But when I execute the code the following error comes up:</p>
  
  <pre><code>unknown error: $ is not defined
  </code></pre>
  
  <p>How can I solve this?</p>