2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-22 19:08:55 +00:00

Add plugin alias. Fixes #153

This commit is contained in:
Tomas Kirda 2014-08-24 19:12:49 -05:00
parent e33cfc8a7f
commit 00cefad1ae
3 changed files with 7 additions and 2 deletions

View File

@ -159,6 +159,11 @@ you can supply the "paramName" and "transformResult" options:
}
})
##Known Issues
If you use it with jQuery UI library it also has plugin named `autocomplete`. In this case you can use plugin alias `devbridgeAutocomplete`:
$('.autocomplete').devbridgeAutocomplete({ ... });
##License

View File

@ -47,7 +47,7 @@ $(function () {
});
// Initialize autocomplete with local lookup:
$('#autocomplete').autocomplete({
$('#autocomplete').devbridgeAutocomplete({
lookup: countriesArray,
minChars: 0,
onSelect: function (suggestion) {

View File

@ -890,7 +890,7 @@
};
// Create chainable jQuery plugin:
$.fn.autocomplete = function (options, args) {
$.fn.autocomplete = $.fn.devbridgeAutocomplete = function (options, args) {
var dataKey = 'autocomplete';
// If function invoked without argument return
// instance of the first matched element: