Skip to content

Commit 00cefad

Browse files
author
Tomas Kirda
committed
Add plugin alias. Fixes devbridge#153
1 parent e33cfc8 commit 00cefad

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ you can supply the "paramName" and "transformResult" options:
159159
}
160160
})
161161

162+
##Known Issues
163+
164+
If you use it with jQuery UI library it also has plugin named `autocomplete`. In this case you can use plugin alias `devbridgeAutocomplete`:
165+
166+
$('.autocomplete').devbridgeAutocomplete({ ... });
162167

163168
##License
164169

scripts/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $(function () {
4747
});
4848

4949
// Initialize autocomplete with local lookup:
50-
$('#autocomplete').autocomplete({
50+
$('#autocomplete').devbridgeAutocomplete({
5151
lookup: countriesArray,
5252
minChars: 0,
5353
onSelect: function (suggestion) {

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@
890890
};
891891

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

0 commit comments

Comments
 (0)