title: Close modal popup using jquery
body: <p>Below code is my popup view...and i want to close popup on clicking close button (X) which is on top of popup...at the bottom of view i have jquery to close the popup..but thats not working..i have popup on another popup..just like parent popup and child popup.and in this case i have to close child popup... Please help me out    </p>
  
  <pre><code>&lt;div class="modal-dialog" style="width:1056px" id="pop"&gt;
      &lt;div class="modal-content"&gt;
         &lt;div class="modal-header"&gt;            
              &lt;input type="button" onclick="close()" id="button" value="Close [x]" /&gt;          
  
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;div class="scroller"&gt;
                  &lt;table class="display table table-striped table-bordered table-hover" id='tblTicket' cellspacing="0" width="100%"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Data&lt;/th&gt;                            
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;td&gt;Data&lt;/td&gt;                            
                          &lt;/tr&gt;
  
                      &lt;/tbody&gt;
                  &lt;/table&gt;
  
  
                  &lt;table class="display table table-striped table-bordered table-hover" id='tblTicket' cellspacing="0" width="100%"&gt;
                      &lt;tr&gt;
                          &lt;th&gt;DATA&lt;/th&gt;                        
                      &lt;/tr&gt;
  
                      @foreach (var item in Model)
                      {
                          &lt;tr&gt;
                              &lt;td&gt;
                               data 
                              &lt;/td&gt;                           
                          &lt;/tr&gt;
                      }
  
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript" language="javascript"&gt;
  $("#button").click(function () {        
      $("#pop").close
         });
  &lt;/script&gt;
  </code></pre>