title: dialog jquery has no method when loading modal window
body: <p>I am trying to open a url in modal window but i am getting the following error message: Uncaught  TypeError: Object [object object] has no method 'dialog'. Below is my code.</p>
  
  <pre><code>function()
  {
     var id = $("#grid").jqGrid('getGridParam','selrow'), 
    data={};
    if(id) 
    {
         data = {assetID:id};
    }
     else 
    {
       alert('Please select a row to edit');
       return;
    } 
     var ajaxDialog = $('&lt;div id="ajax-Dialog" style="display:hidden" title="New Work Order"&gt;&lt;/div&gt;').appendTo('body');
     ajaxDialog.load('forms/mwoForm.php',
         data,
         function(response, status)
         {
             ajaxDialog.dialog(
             {
                 width: 'auto',
                 modal:true,
                 open: function(ev, ui)
                 {
                    $(".ui-dialog").css('font-size','0.9em');
                 },
                 close: function(e,ui) 
                 {
                     ajaxDialog.remove();
                 }
             });
          }
      );
  }
  </code></pre>