Why my 'else' do not work?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2076988/why-does-id-return-true-if-id-doesnt-exist">Why does $(‘#id’) return true if id doesn’t exist?</a>  </p>
</blockquote>



<p>I have a very simple js function:</p>

<pre><code>function refresh(ltr) {
    if (board.find('p:contains("' + ltr + '")')) {
        board.find('p:contains("' + ltr + '")').show();
    } else {
        alert('Hello.');  
    }
}
</code></pre>

<p>Obviously I pass a string to ltr, it works fine if it contains the string but if not it do not fire the alert... </p>

<p>Do you know why?</p>
