Error with jquery auto-complete in rails

I am trying to get autocomplete to work, however, I get a strange javascript error in firebug console ...

I used https://github.com/crowdint/rails3-jquery-autocomplete gem.

The error I get is: $(e).autocomplete is not a function

Here are the scripts that I include in my html:

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
  <script src="/javascripts/autocomplete-rails.js?1294035084" type="text/javascript"></script>

thank

+3
source share
2 answers

Have you changed the default javascript library using this stone ?

This is one of the prerequisites of your gem.

0
source

​​ jQuery UI. -, rails3-jquery-autocomplete , jQuery. , jquery-rails jQuery jQuery js CSS .

<%= javascript_include_tag :defaults, "jquery-ui-1.8.9.custom.min", "autocomplete-rails" %> 

Github:

,

, jQuery-ui .

:

http://jquery.com/

http://jqueryui.com/demos/autocomplete/

http://github.com/rails/jquery-ujs

, 3 .

+2

Source: https://habr.com/ru/post/1783254/


All Articles