# Class: SkinSelect

## SkinSelect

#### new SkinSelect($select [, userOptions])

  Skin an HTML select element. If options.full is set to true, also skin the options list. You can access the skin API in the __skinAPI property of the $select HTMLElement or its wrapper.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `$select` | HTMLElement |  |
  `userOptions` | Object | <optional> | ###### Properties
  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `full` | Boolean | <optional> | false | if true, skin event the option list
  `extraClass` | Array | <optional> | [] |
  `className` | String | <optional> | select-skin |
  `itemClassName` | String | <optional> | select-itm |
  `selectWrapClassName` | String | <optional> | select |
  `openedListClass` | String | <optional> | show |
  `activeOptionClass` | String | <optional> | on |
  `disabledClass` | String | <optional> | disabled |
  `invalidClass` | String | <optional> | invalid |
  `loadingClass` | String | <optional> | loading |
  `listTpl` | String | <optional> |  |

### Methods

#### disable()

  Force the select to be disable

#### enable()

  Force the select to be enable

#### select(optionOrIndex)

  Select an option

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `optionOrIndex` | HTMLElement | Number |

#### setInvalid()

  Force the state of the select to invalid

#### setLoading()

  Add the loading css class to the main element

#### setValid()

  Force the state of the select to valid

#### unsetLoading()

  Remove the loading css class to the main element

#### updateOptions( [optionsArray])

  Update the options list. If optionsArray is not set, only update the html of the skinned options list.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `optionsArray` | Array | <optional> |

  ##### Example

      selectAPI.updateOptions( [{"text": "Option 1", "value": "value 1", "selected": true}, ...] )

#### updateTitle()

  Force the update of title with the currently selected element text

#### Search results