title: jQuery ":contains()" analog for pure JS
body: <p>I'm writing a script for CasperJS. I need to click on the link that contains a span with "1". In jQuery can be used <code>:contains('1')</code>, but what the solution is for selectors in pure Javascript?</p>
  
  <p>HTML: <code>&lt;a class="swchItem"&gt;&lt;span&gt;1&lt;/span&gt;&lt;/a&gt;&lt;a class="swchItem"&gt;&lt;span&gt;2&lt;/span&gt;&lt;/a&gt;</code></p>
  
  <p>jQuery variant: <code>$('a .swchItem span:contains("1")')</code></p>
  
  <p><strong>UPD</strong> CasperJS code:</p>
  
  <pre><code>casper.then(function () {
      this.click('a .swchItem *select span with 1*')
  })
  </code></pre>