Sha256: 9131edd2c1d5bf44ced068abe47da34327a7b54cad72f375ec9c1186ad3c4a7b

Contents?: true

Size: 399 Bytes

Versions: 5

Compression:

Stored size: 399 Bytes

Contents

/*
* Unobtrusive autocomplete
*
* To use it, you just have to include the HTML attribute autocomplete
* with the autocomplete URL as the value
*
*   Example:
*       <input type="text" autocomplete="/url/to/autocomplete">
*       
*/

$(document).ready(function(){
  $('input[autocomplete]').each(function(i){
    $(this).autocomplete({
      source: $(this).attr('autocomplete')
      });
  });
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails3-jquery-autocomplete-0.2.0 lib/generators/templates/autocomplete-rails.js
rails3-jquery-autocomplete-0.1.3 lib/generators/templates/autocomplete-rails.js
rails3-jquery-autocomplete-0.1.2 lib/generators/templates/autocomplete-rails.js
rails3-jquery-autocomplete-0.1.1 lib/generators/templates/autocomplete-rails.js
rails3-jquery-autocomplete-0.1.0 lib/generators/templates/autocomplete-rails.js