title: How to display popup selected value in text-box
body: <p>I designed one input text-box with button. Once i click the text-box it's shows one popup.Popup contains table with values. Now i selected one value, but it is not displayed in the text-box.</p>
  
  <p>How to get the value? Please guide me.</p>
  
  <pre><code>&lt;div&gt;
  &lt;label for="name" style="margin: 0px;"&gt;EMP NAME&lt;/label&gt;
  &lt;input type="text" class="input-normal" id="empname" href="#fee-details" data-toggle="modal" style="line-height: initial; margin-left: 6px;"&gt;
  &lt;/div&gt;
  
  &lt;div class="modal fade" id="fee-details" tabindex="-1" role="dialog" aria-labelledby="fee-details-label" aria-hidden="true"&gt;
  &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
          &lt;div class="modal-body"&gt;
              &lt;table class="table table-condensed"&gt;
                  &lt;thead class="modal-header login-modal-header"&gt;
                      &lt;tr style="width:100%;"&gt;
                          &lt;th style="width:50%;"&gt;Header1&lt;/th&gt;
                          &lt;th style="width:50%;"&gt;Header2&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody class="body"&gt;
                      &lt;tr&gt;
                          &lt;td&gt;1&lt;/th&gt;
                          &lt;td class='val'&gt;A&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;2&lt;/th&gt;
                          &lt;td class='val'&gt;B&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;3&lt;/th&gt;
                          &lt;td class='val'&gt;C&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;4&lt;/th&gt;
                          &lt;td class='val'&gt;D&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;5&lt;/th&gt;
                          &lt;td class='val'&gt;E&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;6&lt;/th&gt;
                          &lt;td class='val'&gt;F&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/tbody&gt;
              &lt;/table&gt;          
          &lt;/div&gt;
      &lt;/div&gt;&lt;!-- /.modal-content --&gt;
  &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>$('.body').on('click',function(){
      $('#empname').val($(this).find('.val').html());
      $('#fee-details').modal('toggle');
  });
  </code></pre>