Selects

Create styleable, cross-browser compatible selects.


Usage

To apply this component, just add the data-select attribute to an individual select or a parent element (like a form). When applied to a parent, all selects within that element will be transformed.

Usage

  • <select data-select>
        <option>...</option>
        <option>...</option>
        <option>...</option>
        <option>...</option>
    </select>

Native Element

If you choose to not include the Select Component, select elements will default to a nicely styled native element

Usage

  • <select>
        <option>...</option>
        <option>...</option>
        <option>...</option>
        <option>...</option>
    </select>

JavaScript

Manual Initialization

<!-- Clique.UI API -->
Clique.select('.my-select', {
    // Options...
});

<!-- jQuery API -->
$('.my-select').clique('select', {
    // Options...
});

Options

Option Type Default Description
inheritClasses Boolean true Whether the created component should inherit the classes of the native element.

Events

Name Parameter Description
clique.select.change
Event jQuery Object
Index of Item Integer
Selected Item Object
On selection change