title: i get TypeError: $(...).autocomplete is not a function all the time
body: <p>i am new all around  jquery and ajax in ASP.net MVC. i would like that one of my text fields will be autocompleted. for now this is my implementation but for some reason i got this error:</p>
  
  <pre><code>TypeError: $(...).autocomplete is not a function
  </code></pre>
  
  <p>and when i go inside i get:</p>
  
  <pre><code> &lt;anonymous&gt;
   Create:36
  jQuery.Callbacks/fire()
   jquery-1.10.2.js:3048
  jQuery.Callbacks/self.fireWith()
   jquery-1.10.2.js:3160
  .ready()
   jquery-1.10.2.js:433
  completed()
   jquery-1.10.2.js:104
  </code></pre>
  
  <p>this is my view file create.cshtml:</p>
  
  <pre><code>   @model StudentsManagment.Models.student
  &lt;link href="~/Content/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" /&gt;
  &lt;script src="~/scripts/jquery-1.10.2.js"&gt;&lt;/script&gt;
  &lt;script src="~/scripts/jquery-ui-1.10.4.custom.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $("#citySearch").autocomplete({
              source: function(request,response) {
                  $.ajax({
                      url: "/Home/AutoCompleteCountry",
                      type: "POST",
                      dataType: "json",
                      data: { term: request.term },
                      success: function (data) {
                          response($.map(data, function (item) {
                              return { label: item.Country, value: item.Country };
                          }))
  
                      }
                  })
              },
              messages: {
                  noResults: "", results: ""
              }
          });
      })
  &lt;/script&gt;
  
  @{
      ViewBag.Title = "Create";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h2&gt;Create&lt;/h2&gt;
  
  
  
  @using (Html.BeginForm()) 
  {
    @Html.AntiForgeryToken()
  
      &lt;div class="form-horizontal"&gt;
          &lt;h4&gt;Student&lt;/h4&gt;
          &lt;hr /&gt;
          @Html.ValidationSummary(true, "", new { @class = "text-danger" })
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.First_name, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.First_name, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.First_name, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Last_name, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Last_name, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Last_name, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Date_of_birth, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Date_of_birth, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Date_of_birth, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Student_id, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Student_id, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Student_id, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.City, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.TextBox("searchCity", null, new { @class = "form-control", id = "citySearch" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Description, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
  
                  @Html.EditorFor(model =&gt; model.Description, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Description, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
                  &lt;input type="submit" value="Create" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  
  &lt;div&gt;
      @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  </code></pre>
  
  <p>does it a jquery error or something with my cshtml file is wrong?</p>