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:
parent
e33cfc8a7f
commit
00cefad1ae
@ -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
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user