title: jQuery giving error "Object doesn't support this property or method" on method datepicker
body: <p>The script on the following ASP.NET partial view is causing me endless amounts of grief:</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;AkwiMemorial.Models.CalendarModel&gt;" %&gt;
  &lt;link href="../../Content/jquery.ui.all.css" rel="stylesheet" type="text/css" /&gt;    
        &lt;script type="text/javascript" src="../../Scripts/jquery-1.6.1.min.js"&gt;&lt;/script&gt;     
        &lt;script type="text/javascript" src="../../Scripts/jquery.ui.core.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="../../Scripts/jquery.ui.datepicker.js"&gt;&lt;/script&gt;
  
  **&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
      $('#datepicker').datepicker({
          inline: true,
          onSelect: function(dateText, inst) {
          $('#DateStr').val(dateText);
          $('form').trigger('submit');   }});      
      });
  &lt;/script&gt;**
  
  
   &lt;% using (Html.BeginForm()) { %&gt;   
   &lt;div&gt;
     &lt;div id="datepicker" &gt;&lt;/div&gt;
     &lt;%= Html.HiddenFor(x =&gt; x.DateStr)%&gt;
  &lt;/div&gt;
   &lt;% } %&gt;
  </code></pre>
  
  <p>I have tried using jQuery 1.4.4, 1.5.1 and 1.6.1, all to no avail.  From the numerous related posts I have come across, it sounds like the datepicker script is not being loaded.  Why so, even when it is referenced?</p>