Changing width of jquery-ui autocomplete widgets individually

前端 未结 11 945
挽巷
挽巷 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 17:19

    Reading API, I've just add a class ui-front to the parent's div of my input, and that works fine.

    See here :

    [...] the parents of the input field will be checked for a class of ui-front. If an element with the ui-front class is found, the menu will be appended to that element. Regardless of the value, if no element is found, the menu will be appended to the body.

    The appended element determine the position and width of the menu.

提交回复
热议问题