javascript - autocomplete is not a function Rails 4 -
there tons of discussions topic, don't see answer fits particular situation. in rails 4 application, trying use "autocomplete" jquery ui, this:
$(function() { $(".donor_name").autocomplete({ source: '/donors/?format=json' }); });
the javascript console error is:
uncaught typeerror: $(...).autocomplete not function
which seems saying, isn't finding jquery ui.
gemfile: group :assets gem 'jquery-ui-rails' end gem 'jquery-rails'
and in app/assets/javascripts/application.js,
//= require jquery //= require jquery_ujs
(i tried require jquery-ui wasn't recognized)
versions: jquery-rails 4.0.4 jquery-ui-rails 5.0.5
perhaps has seen before?
update. @marsatomic, using gems, , other person, did follow directions in gem documentation. installation somehow doesn't find "jquery-ui". hoping had seen problem before.
you first need jquery ui installed. rails gem , instructions here: https://github.com/joliss/jquery-ui-rails
Comments
Post a Comment