title: Id does not appear to lower down in the same id. (JQuery)
body: <p>I have a problem when click in the first id=addfriends it show(work), but id below not work. The following of code.</p>
  
  <p>Ok my wrong code. solved.</p>
  
  <pre><code>$(document).ready(function(){
      $(".addfriends").click(function(){
         var ajax_load = "&lt;img src='http://localhost/anime/asset/img/loading.gif' alt='loading...' /&gt;"
         $('#result').html(ajax_load).load('http://localhost/anime/asset/html/add_friends.html #add-content-friends');
      });
      $(document).delegate(".close", 'click', function(){
          $("#add-content-friends").remove();    
      });
  });
  
  &lt;div id="result"&gt;&lt;/div&gt;
  
  loop
      ...
      &lt;tr&gt;&lt;td&gt;&lt;a id="addfriends" href="#add/&lt;?php echo $comments['idusers']; ?&gt;"&gt;Add friends&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
      ...
  endloop
  
  $(document).ready(function(){
      $(document).on("#addfriends", 'click', function(){
         var ajax_load = "&lt;img src='...' alt='loading...' /&gt;"
         $('#result').html(ajax_load).load('../add_friends.html #add-content-friends');
      });
      $(document).on(".close", 'click', function(){
          $("#add-content-friends").remove();    
      });
  });
  </code></pre>