Changing width of jquery-ui autocomplete widgets individually

前端 未结 11 883
挽巷
挽巷 2020-12-14 16:42

I\'m working with mutiple jquery-ui autocomplete widgets on one page and want to be able to set the widths of each one individually. Currently, I\'m doing it like this:

11条回答
  •  攒了一身酷
    2020-12-14 16:57

    I like @Martin Lögdberg answer but if you're using fixed sized widths rather than doing some fancy maths on the returned results to set the width, then you could also just set the width in CSS

    ul .ui-autocomplete {
      width: 50%;
    }
    

提交回复
热议问题