title: Can I use jQuery to check if the entire page contains text?
body: <p>Is there a way to use jQuery to tell if an entire webpage includes some text? For instance, on StackOverflow, I can return any divs that contain the word "Badges" by using the following in the console:</p>
  
  <pre><code>$("div:contains('Badges')")
  </code></pre>
  
  <p>However, when I write:</p>
  
  <pre><code>$(document:contains('Badges'))
  </code></pre>
  
  <p>or </p>
  
  <pre><code>$("document:contains('Badges')")
  </code></pre>
  
  <p>I get an error. How can I check if any element on the page contains certain text and return those elements?</p>