title: Jquery find+length/size returns 0
body: <p>I have some divs created dynamically this way:</p>
  
  <pre><code> //here goes some loop, and everything works fine
   $("#result_main_search").append('&lt;div class="singleresult_main_search"&gt;
   &lt;a href="http://somesite.com/" class="linktosight"&gt;'
    + SightsList[i]+ '&lt;/a&gt;  –  ' + 
  '&lt;img src="/images/balloon.gif" rel="'+ i 
   +'" class="balloon_img_main_search" /&gt;&lt;/div&gt;');    
  </code></pre>
  
  <p>After that loop, I try to set href attribute for each link:</p>
  
  <pre><code>$('.singleresult_main_search').each(function() {
    $.get("_ajax_get_sight_link.php", {'id':$("img", this).attr('rel')}, 
     function(data) { 
       alert($(this).find('.linktosight').length);
       $(this).find('a').attr('href', data);    
       alert(data);
     });
  })
  </code></pre>
  
  <p><code>_ajax_get_sight_data.php</code> accepts id, returns link <em>( alert(data) works fine)</em> . 
  But alert which tells how much .linktosight elements are in current div always gives 0 (by saying always I mean everytime it finds one of my generated divs). I've tried <code>.size()</code>, <code>$(this).find('a')</code> with the same result. So, how am I to set it to work?</p>