title: Popup not opening for the second time
body: <p>I'm using popup from webgrid which edits the details of a candidate. The pop is opening when i click for the first time. When i click second time it is not showing up.</p>
  
  <p>//Script</p>
  
  <pre><code>  function EditProduct(cid) {
  
          var ph = $("#DivToAppendPartialView");
          alert(cid);
          ph.load("/CandidateDetails/EditCandidateDetails?candidateid=" + cid, function () {
              alert('hi');
              ph.dialog({
                  modal: true,
                  width: 560,
                  height: 560,
                  title: "Edit Candidate",
                  resizable: false
              });
          });
      }
  </code></pre>
  
  <p>When clicking second time the alert('hi') is firing but not the popup.</p>
  
  <p>//Grid Column</p>
  
  <pre><code>  grid.Column("", header: "Actions", canSort:false,
          format: @&lt;text&gt;
                    @Html.Raw("&lt;img src='/Images/edit-icon.png' alt='Edit' title='Edit' onclick='EditProduct(" + item.CDId + ")'  /&gt;")
                    @Html.Raw("&lt;img src='/Images/delete-icon.png' alt='Delete' title='Delete' onclick='DeleteProduct(" + item.CDId + ")'  /&gt;")
                   &lt;/text&gt;
  </code></pre>
  
  <p>//Scripts used</p>
  
  <pre><code>&lt;script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>