0

I use jquery combobox autocomplete like in the demo below.

jquery combobox autocomplete

After i add jQuery UI Autocomplete Select First Extension, i have problem with the width of suggestion area.

In some case, the width of suggestion area bigger than usual. How to fix this problem?

I know i can put in this code :

$(this).autocomplete("widget").css({"width": 250});

but, it will change all of my combo style. So could i put in this code on every combobox i made?how can i do that?

thx.

guurnita
  • 347
  • 5
  • 10
  • 22

1 Answers1

2

I would just change the css for the ul.ui-autocomplete list. jsFiddle

.ui-autocomplete {
    width: 300px;
    background-color:red;
}    

.ui-autocomplete li {
    border: 1px solid black;
}

If you need to change the class for the results ul, then I would follow this link here to a solution. SO Link

Community
  • 1
  • 1
JoeFletch
  • 3,820
  • 1
  • 27
  • 36