title: how to use .load() to load only the specific div from a different html file
body: <p>I have an html file, and I am using <code>.load()</code> to load some part of <strong>div</strong> <code>photo_index</code> from another html file into a <strong>div</strong>  (<code>profile_wrapper_container_FormLogs</code>) in my original html. It does load the html file. But it loads the whole html file, and not only the div. What do I do to load only the needed div, ie.<code>photo_index</code>, from another html? Any help will be much appreciated. Thank you!</p>
  
  <p>html:</p>
  
  <pre><code>            &lt;div id="profile_leftbar"&gt;
  
                  &lt;div id="profile_wrapper_container_summary"&gt;
                      &lt;div id="profile_container_summary"&gt;
                          &lt;div id="profile_summary"&gt;
                              &lt;div id="profile_box1" class="box"&gt;
                                  &lt;a href="kkh.html" id="photo"&gt;&lt;p&gt;Photo&lt;/p&gt;
                                      &lt;p&gt;450&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div id="profile_box2" class="box"&gt;
                                  &lt;a href="#" id="video"&gt;&lt;p&gt;Video&lt;/p&gt;
                                      &lt;p&gt;132&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div id="profile_box3" class="box"&gt;
                                  &lt;a href="#" id="page"&gt;&lt;p&gt;Page&lt;/p&gt;
                                      &lt;p&gt;14&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div id="profile_box4" class="box"&gt;
                                  &lt;a href="#" id="forum"&gt;&lt;p&gt;Forum&lt;/p&gt;
                                      &lt;p&gt;51&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div id="profile_box5" class="box"&gt;
                                  &lt;a href="#" id="followers"&gt;&lt;p&gt;Followers&lt;/p&gt;
                                      &lt;p&gt;551&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div id="profile_box6" class="box"&gt;
                                  &lt;a href="#" id="following"&gt;&lt;p&gt;Following&lt;/p&gt;
                                      &lt;p&gt;317&lt;/p&gt;&lt;/a&gt;
                              &lt;/div&gt;
                              &lt;span class="clear_left"&gt;&lt;/span&gt;
                          &lt;/div&gt;
                          &lt;div id="profile_status"&gt;
                              &lt;p&gt;What???&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div id="profile_wrapper_container_FormLogs"&gt;
                      &lt;div id="profile_container_status_form"&gt;
                          &lt;textarea class="profile_status_form"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                      &lt;div id="profile_container_logs"&gt;
  
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 30th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Created a blog &lt;a href="#"&gt;'This world'&lt;/a&gt; on 17th oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 16th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Updated status 'Do you really think so?' on 10th Oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Uploaded video.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 30th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Created a blog &lt;a href="#"&gt;'This world'&lt;/a&gt; on 17th oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 16th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Updated status 'Do you really think so?' on 10th Oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Uploaded video.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 30th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Created a blog &lt;a href="#"&gt;'This world'&lt;/a&gt; on 17th oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Added photo on 16th oct&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Updated status 'Do you really think so?' on 10th Oct.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="profile_logs"&gt;
                              &lt;p&gt;Uploaded video.&lt;/p&gt;
                          &lt;/div&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;/div&gt;
  </code></pre>
  
  <p>another html:</p>
  
  <pre><code>    &lt;div id="test"&gt;
          &lt;h1&gt;Testing the .load()&lt;/h1&gt;
      &lt;/div&gt;
  
  
      &lt;div id="photo_index"&gt;
  
  
  
          &lt;div id="tools_photo"&gt;
              &lt;ul id="tools"&gt;
                  &lt;li&gt;&lt;a href="#"&gt;All&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Album&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Tagged Photo&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Upload Photo&lt;/a&gt;&lt;/li&gt;
              &lt;span class="clear_left"&gt;&lt;/span&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
  
  
  
          &lt;div id="photo_index_page"&gt;
  
                  &lt;div id="container_thumbnail_container"&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img2.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img3.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img4.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img5.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img2.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img3.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img4.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="thumbnail_container"&gt;
                          &lt;a href="#" class="gallery" title="{{photo.title}}"&gt;&lt;img src="img5.jpg" class="thumbnail" /&gt;&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;span class="clear_left"&gt;&lt;/span&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>.js:</p>
  
  <pre><code>$(document).ready(function () {
      $(".box a").click(function () {
          $("#profile_wrapper_container_FormLogs").load(this.href + "#photo_index");
          return false;
      });
  });
  </code></pre>