2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-14 01:04:06 +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 ##License

View File

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

View File

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