title: Error: TypeError: $(…).dialog is not a function
body: <p>i am trying to load a dialog box using jquery.but the problem is that when i click on a link to open the dialog box it did'nt open.also i get an error as" $("#dv").dialog is not a function "
  this is my code</p>
  
  <pre><code>&lt;link type="text/css" rel="stylesheet" href="&lt;?php echo base_url();?&gt;jquery-ui-1.8.11.custom/css/redmond/jquery-ui-1.8.11.custom.css"/&gt;
  &lt;script type="text/javascript" src="&lt;?php echo base_url();?&gt;jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="&lt;?php echo base_url();?&gt;jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      function adminl(){
          $("#uname").val("");
          $("#uemail").val("");
          $("#uphone").val("");
          $("#umessage").val("");
          $('#contact_form_errorloc').html("");
          $('#dv').dialog({
              modal:true,
              title:"Contact Us",
              width:390,
              height:570,
              });
      }
  
  &lt;div id="dv" style="display:none"&gt;
  
  &lt;style&gt;
  label,a, body 
  {
      font-family : Arial, Helvetica, sans-serif;
      font-size : 12px; 
  }
  .err
  {
      font-family : Verdana, Helvetica, sans-serif;
      font-size : 12px;
      color: red;
  }
  &lt;/style&gt;    
  
  
  &lt;div id='contact_form_errorloc' class="err"&gt;&lt;/div&gt;
  &lt;form  name="contact_form" id="contact_form" &gt; 
  
  
  
  
  &lt;p&gt;
  &lt;label for='name'&gt;Name: &lt;/label&gt;&lt;br&gt;
  &lt;input type="text" name="uname" id="uname" size=43 /&gt;
  &lt;/p&gt;
  &lt;p&gt;
  &lt;label for='email'&gt;Email: &lt;/label&gt;&lt;br&gt;
  &lt;input type="text" name="uemail" id="uemail" size=43 /&gt;
  &lt;/p&gt;
  &lt;p&gt;
  &lt;label for='phone'&gt;Phone Number: &lt;/label&gt;&lt;br&gt;
  &lt;input type="text" name="uphone" id="uphone" size=43 /&gt;
  &lt;/p&gt;
  &lt;p&gt;
  &lt;label for='message'&gt;Comments/Questions:&lt;/label&gt; &lt;br&gt;
  &lt;textarea name="umessage" id="umessage" rows=8 cols=40&gt;&lt;/textarea&gt;
  &lt;/p&gt;
  &lt;p style="width:2px; margin-top:10px;"&gt;
  &lt;?php
            require_once('recaptchalib.php');
            $publickey = "6Lf948kSAAAAADGf542VNVyURY_WtsyAk7LbUvtD"; // you got this from the signup page
            echo recaptcha_get_html($publickey);
  ?&gt;
  &lt;/p&gt;
  &lt;input type="button" class="submit_ad_button" style="border:0; margin-bottom:10px;margin-left: 0; float:left;" value="Send" onClick="form_submit()"/&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;a onclick="adminl(event)"&gt;contact us&lt;/a&gt; 
  </code></pre>