Skip to main content

Search and Top Navigation

#15040 closed feature (worksforme)

Opened September 02, 2016 07:53PM UTC

Closed September 03, 2016 01:12AM UTC

Cannot customize css of a single autocomplete combobox pull-down list

Reported by: dbeusee Owned by:
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.12.0
Keywords: Cc:
Blocked by: Blocking:
Description

I have several autocomplete comboboxes on my site, some of which are using a different font. But when the list comes up, it is using the default size which can only be customized with class combobox-context-menu. jquery-ui does not add the name or id of my SELECT element to the list, so I have no way to customize just that list. I would like jquery-ui to add my name and/or id so that I can have custom css for just that list and not all others. Currently it uses something like ui-id-2. I have no way to determine this id. I'd like it to take the id of the SELECT element and add -ui-ul to it (or something like that). So for instance, if I have id="newcc" on my SELECT element, the UL element generated by jquery-ui should use id="newcc-ui-ul".

Attachments (0)
Change History (2)

Changed September 03, 2016 12:34AM UTC by arschmitz comment:1

This is what the new classes option is for http://api.jqueryui.com/1.12/autocomplete/#option-classes you can add your own classes to an individual auto complete's elements

Changed September 03, 2016 01:12AM UTC by scottgonzalez comment:2

resolution: → worksforme
status: newclosed

Yup, this is already possible. This was also possible before the classes option via the widget() method.

http://jsbin.com/maxeqogaqe/edit?html,css,js,output