ui.autocomplete.js 493 B

1234567891011121314151617181920212223
  1. /**
  2. *
  3. */
  4. elgg.provide('elgg.autocomplete');
  5. /**
  6. * @requires jqueryui.autocomplete
  7. */
  8. elgg.autocomplete.init = function() {
  9. $('.elgg-input-autocomplete').autocomplete({
  10. source: elgg.autocomplete.url, //gets set by input/autocomplete view
  11. minLength: 2,
  12. html: "html",
  13. // turn off experimental live help - no i18n support and a little buggy
  14. messages: {
  15. noResults: '',
  16. results: function() {}
  17. }
  18. });
  19. };
  20. elgg.register_hook_handler('init', 'system', elgg.autocomplete.init);