1

I really don't know what I am doing wrong, I checked multiple answers but no success:

My scripts loading order:

@Scripts.Render("~/Scripts/jquery-1.10.2.js")
@Scripts.Render("~/Scripts/jquery-ui.js")
@Scripts.Render("~/Scripts/custom/cityGuessGameHome.js");

in custom js:

$(document).ready(function () {
    $.ajax({
        url: '/Home/GetCities/',
        type: 'GET',
        success: function (result) {
            $("#cities").autocomplete({
                source: result
            });
        }
    });
});

Uncaught TypeError: $(...).autocomplete is not a function

Scripts ordering is fine I guess, why do I get this error then?

Mefhisto1
  • 2,188
  • 7
  • 34
  • 73

1 Answers1

0

Try below live js instead your local one:

<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
Hetal Chauhan
  • 787
  • 10
  • 22