title: Twitter Bootstrap: Set data to the parent div of Modal
body: <p>I am using Twitter Bootstrap Modal as a search box.<br/>There are 3-4 divs from where User can call the modal and do the search. Search results are shown in table format on modal itself.<br/> When user clicks a row from search result, I have to take the selected row data and populate the parent div fields.<br/>How would I determine the respective parent div which called search modal?<br/>
  <strong>Code</strong></p>
  
  <pre><code>    //initiates the modal
      $('#searchClient').click(function() {
                          clearTable();
                          $('#searchModal').modal('toggle');
                      });
  
      //reads data from clicked row
      $("#clientSearchResult").delegate("tr", "click", function(){
                          alert($(this).html());
  //??Find out the parent div and populate selected data
                      });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="modal fade" id="clientSearchModal"&gt;
        &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
              &lt;h4 class="modal-title"&gt;Client Search&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
              &lt;div class="form-inline"&gt;
                  &lt;input type="text" id="searchClientName" placeholder="Client Name"&gt;
                  &lt;input type="text" id="searchNumber" placeholder="Number"&gt;
                  &lt;button type="button" class="btn btn-primary" id="doClientSearch"&gt;Search&lt;/button&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;table class="table table-hover table-bordered" id="clientSearchResult"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                          &lt;th&gt;Tax Id&lt;/th&gt;
                          &lt;th&gt;Status&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                  &lt;/tbody&gt;
              &lt;/table&gt;
            &lt;/div&gt;
          &lt;/div&gt;&lt;!-- /.modal-content --&gt;
        &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
      &lt;/div&gt;
  </code></pre>