glebkema / jquery-stylize-select

This plugin adds blocks around the selection field and creates the necessary event handlers. You can stylize the look of these blocks using the CSS. The plugin simplifies website development.
MIT License
1 stars 0 forks source link

Provide a way to style the selected list item #5

Closed glebkema closed 5 years ago

glebkema commented 5 years ago

It is required to set styles through CSS for the list item that is currently selected.

The selected <option> can be styled through :selected. But the plugin does not pass this property to the corresponding <li> item.

For example, a plugin can add and remove a style class when the user selects a new item from the list. Like .custom-select__selected or something like that.