title: jQuery select img with src
body: <p>I want to select an image (with jQuery) by the src attribute. The Image is inside an ul and a collection of div's. The id of the ul is "sortable".</p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;ul id="sortable"&gt;
    &lt;li id="pic_0"&gt;
      &lt;div class="sortEleWrapper"&gt;
        &lt;div class="imgWrapper"&gt;
          &lt;img src="/test1.jpg"&gt;
        &lt;/div&gt;
        &lt;input type="text" name="picText" id="picText" value="""" style="width:105px;color:#aaa" class="sortInput"&gt;
      &lt;/div&gt;
      &lt;input type="hidden" id="picSrc" name="picSrc" value="/test1.jpg"&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>etc.</p>
  
  <p>and here is my js:</p>
  
  <pre><code>if($('#sortable').find('img[src="/test1.jpg"]').length &gt; 0){
      alert('img exists');
  }else{
      alert('img doesnt exists');
  }
  </code></pre>
  
  <p>My problem is, that they don't find any image. But if I write the js like this:</p>
  
  <pre><code>if($('img[src="/test1.jpg"]').length &gt; 0){
      alert('img exists');
  }else{
      alert('img doesnt exists');
  }
  </code></pre>
  
  <p>so they find the image.</p>