title: Jquery Modal Doesnt Work On Second Click on content delivered via Ajax
body: <p>I am loading some html into a div from an ajax call. With in this html content, when clicked opens a jquery modal. 
  On the first click the modal opens as it should, but on subsequent clicks the modal will not open and get this error in the console:</p>
  
  <pre><code> Uncaught TypeError: $(...).dialog is not a function
  </code></pre>
  
  <p>Here is the html that is generated via the ajax call which when clicked will open the modal:</p>
  
  <pre><code> &lt;div class="edit" rel="630000311"&gt;630000311&lt;/div&gt;
  </code></pre>
  
  <p>Here is the CSS as it relates to the edit class:</p>
  
  <pre><code>.edit {
     cursor: pointer;
     color: blue;
     font-size: 16px;
     padding-left:5px;
     text-decoration: underline;
    }
    .ui-widget-overlay {
      position: fixed; 
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      opacity: 0.7;
      filter: alpha(opacity=50); 
     }
  </code></pre>
  
  <p>here is my jquery</p>
  
  <pre><code>       $(document).ready(function(){
         $('body').on('click','.edit', function(){ 
        var myDialogX = $(this).position().left - $(this).outerWidth();
        var myDialogY = $(this).position().top - ( $(document).scrollTop() +      $('.ui-dialog').outerHeight() );
     $("#viewDialog").dialog({
         width: 1140,
         modal: true,
         position: { my: 'top', at: 'top+150' },
     });
     var partID = $(this).attr('rel');
          $.ajax({
              async: false,
              type: 'GET',
              url: "parthistory.php",
              data: {
                  "partID" : partID
              },
              success: function (data) {
                  $("#viewDialog").html(data);
  
              }
          });
  });
  });
  </code></pre>
  
  <p>I have tried adding $(document).trigger('ready'); into the success, but this does not help </p>
  
  <p><strong>Note</strong> Here is the jquery I am loading:</p>
  
  <pre><code>code.jquery.com/jquery-1.11.1.min.js"
  code.jquery.com/ui/1.11.1/jquery-ui.min.js"
  code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" 
  </code></pre>