title: JavaScript runtime error: Object doesn't support property or method 'dialog' IN MVC4
body: <p>I'm new in mvc. I have to display a model dialog box.. but it shows an error like this.. the code should be shown below..</p>
  
  <p>in view</p>
  
  <pre><code>&lt;div class="demo"&gt;
      &lt;div id="dialog-modal" title="Basic dialog"&gt;
  
      &lt;/div&gt;
      &lt;button id="opener"&gt;Open Dialog&lt;/button&gt;
  &lt;/div&gt;
  
  
  
  &lt;script type="text/javascript"&gt;
     $(function () {
          $('#dialog').dialog({
              autoOpen: false,
              width: 400,
              resizable: false,
              title: 'hi there',
              modal: true,           
              buttons: {
                  "Close": function () {
                      $(this).dialog("close");
                  }
              }
          });
  
          $('#opener').click(function () {
              //Load the CreateAlbumPartial action which will return 
              // the partial view _CreateAlbumPartial
              $('#dialog').load('@Url.Action("PartialTest")',
                      function (response, status, xhr) {
                          $('#dialog').dialog('open');
                      });   
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>in controller</p>
  
  <pre><code> //[HttpGet]
          public PartialViewResult Test()
          {
  
              //List&lt;string&gt; category_lst = new List&lt;string&gt;();
              //category_lst = (from r in db.dept select r.dname).ToList();
              return PartialView(db.dept.ToList());
          }
  </code></pre>