title: Append item after last div
body: <pre><code>&lt;div class="follower-list"&gt;
                &lt;?php if (!$publications) { ?&gt;
                  Henüz paylaşılan bir yayın bulunmamaktadır.
                &lt;?php } else { 
                          for ($i = 0; $i &lt; count($publications); $i++) {         
                ?&gt;
                              &lt;div class="media"&gt;
                              &lt;div class="media-body"&gt;
                                  &lt;div class="col-sm-11"&gt;
                                      &lt;i class="fa fa-file-text"&gt;&lt;/i&gt; &lt;?=$publications[$i]["content"]?&gt;
                                  &lt;/div&gt;
                                  &lt;div class="col-sm-1"&gt;
                                      &lt;button class="btn btn-default" onclick="$.delete_publication('&lt;?=$publications[$i]["id"]?&gt;')"&gt;Kaldır&lt;/button&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;/div&gt;
                      &lt;?php } 
                      } ?&gt;
  
                &lt;div class="mb20"&gt;&lt;/div&gt;
  
                &lt;button class="btn btn-primary" id="add_new_publication"&gt;Yeni Yayın Ekle&lt;/button&gt;
  
                &lt;div class="input-group" id="div_publications" style="display: none;"&gt;
                  &lt;input class="form-control" type="text" id="input_publication" name="publication" placeholder="Yayın Adı"&gt;
                  &lt;span class="input-group-btn"&gt;
                      &lt;button type="button" class="btn btn-success" onclick="$.save_new_publication(&lt;?=$USER_ID?&gt;);"&gt;Kaydet&lt;/button&gt;
                      &lt;button type="button" class="btn btn-danger" onclick="$.cancel_new_publication();"&gt;İptal&lt;/button&gt;
                    &lt;/span&gt;
              &lt;/div&gt;
  
  
              &lt;/div&gt;&lt;!--follower-list --&gt;
  </code></pre>
  
  <p>I add some text dynamically, but i want to add after <strong>last media class</strong> </p>
  
  <p>here is my js:</p>
  
  <pre><code>$(".media").append('&lt;div class="media"&gt;&lt;div class="media-body"&gt;&lt;div class="col-sm-11"&gt;&lt;i class="fa fa-file-text"&gt;&lt;/i&gt; ' + response.content + '&lt;/div&gt;&lt;div class="col-sm-1"&gt;&lt;button class="btn btn-default" onclick="$.delete_publication(' + response.id + ')"&gt;Kaldır&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');
  </code></pre>
  
  <p>Append work but it append div after all div which has a <code>media</code> class. But I want to append last <code>media</code>.</p>