JQuery autocomplete result style

后端 未结 4 1255
生来不讨喜
生来不讨喜 2020-12-29 07:17

I\'m trying to change the style from my AutoComplete result.

I tried:


// Only change the inputs
$(\'.ui-autocomplete-input\').css(\'fontSize\', \'1         


        
4条回答
  •  灰色年华
    2020-12-29 07:31

    Just so you know you have two options for optimizing your code:

    Instead of this:

    $('.ui-autocomplete-input').css('fontSize', '10px');
    $('.ui-autocomplete-input').css('width','300px');
    

    You can do this:

    $('.ui-autocomplete-input').css('fontSize', '10px').css('width','300px');
    

    Or even better you should do this:

    $('.ui-autocomplete-input').css({fontSize: '10px', width: '300px'});
    

提交回复
热议问题