Elgg  Version 5.1
autocomplete.js
Go to the documentation of this file.
1 define(['jquery', 'jquery-ui/widgets/autocomplete', 'jquery.ui.autocomplete.html'], function ($) {
2  return {
3  init: function () {
4  $('.elgg-input-autocomplete').each(function () {
5  var $this = $(this);
6  if (!$this.data('autocompleteInitialized')) {
7  $this.data('autocompleteInitialized', true);
8  $this.autocomplete({
9  source: $this.data('source'),
10  minLength: 2,
11  html: "html",
12 
13  // turn off experimental live help - no i18n support and a little buggy
14  messages: {
15  noResults: '',
16  results: function() {}
17  }
18  });
19  }
20  });
21  }
22  };
23 });
define(['jquery', 'jquery-ui/widgets/autocomplete', 'jquery.ui.autocomplete.html'], function($){return{init:function(){$('.elgg-input-autocomplete').each(function(){var $this=$(this);if(!$this.data('autocompleteInitialized')){$this.data('autocompleteInitialized', true);$this.autocomplete({source:$this.data('source'), minLength:2, html:"html", messages:{noResults: '', results:function(){}}});}});}};})