Skip to content

Commit 404e12a

Browse files
committed
Merge branch 'jquery3' of https://github.com/slamere/rails-jquery-autocomplete into slamere-jquery3
2 parents 857d14a + 59e93c1 commit 404e12a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/assets/javascripts/autocomplete-rails-uncompressed.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
(function(jQuery)
1818
{
1919
var self = null;
20-
jQuery.fn.railsAutocomplete = function() {
20+
jQuery.fn.railsAutocomplete = function(selector) {
2121
var handler = function() {
2222
if (!this.railsAutoCompleter) {
2323
this.railsAutoCompleter = new jQuery.railsAutocomplete(this);
2424
}
2525
};
2626
if (jQuery.fn.on !== undefined) {
27-
if (!this.selector) {
27+
if (!selector) {
2828
return;
2929
}
30-
return jQuery(document).on('focus',this.selector,handler);
30+
return jQuery(document).on('focus',selector,handler);
3131
}
3232
else {
3333
return this.live('focus',handler);
@@ -192,6 +192,6 @@
192192
});
193193

194194
jQuery(document).ready(function(){
195-
jQuery('input[data-autocomplete]').railsAutocomplete();
195+
jQuery('input[data-autocomplete]').railsAutocomplete('input[data-autocomplete]');
196196
});
197197
})(jQuery);

lib/assets/javascripts/autocomplete-rails.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)