From cff1fb2a13e18403c02ba516e08db3a5b21a8b6c Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Fri, 27 Feb 2015 15:11:33 -0500 Subject: Autocomplete: Add classes option Ref #7053 Ref gh-1411 --- ui/autocomplete.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'ui') diff --git a/ui/autocomplete.js b/ui/autocomplete.js index 60d69307e..3453ee399 100644 --- a/ui/autocomplete.js +++ b/ui/autocomplete.js @@ -40,6 +40,7 @@ $.widget( "ui.autocomplete", { options: { appendTo: null, autoFocus: false, + classes: {}, delay: 300, minLength: 1, position: { @@ -87,9 +88,8 @@ $.widget( "ui.autocomplete", { this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; this.isNewMenu = true; - this.element - .addClass( "ui-autocomplete-input" ) - .attr( "autocomplete", "off" ); + this._addClass( "ui-autocomplete-input" ); + this.element.attr( "autocomplete", "off" ); this._on( this.element, { keydown: function( event ) { @@ -210,7 +210,6 @@ $.widget( "ui.autocomplete", { this._initSource(); this.menu = $( "