## Api and options

Fast select can be instantiated via plugin facade. If there is a need to obtain fastselect object instance you can do so via jquery data utility. Alternatively you can can just use fast select constructor.

                var $select = $('select');

                // Run, fire and forget
                $select.fastselect()

                // Run via plugin facade and get instance
                var fastSelectInstance = $select.fastselect(options).data('fastselect');

                // run directly
                var fastSelectInstance = new $.Fastselect($select.get(0), options);

Plugin options / defaults are exposed in $.Fastselect.defaults namespace so you can easily adjust them globally. Full list of options is bellow.

                $.Fastselect.defaults = {

                    elementClass: 'fstElement',
                    singleModeClass: 'fstSingleMode',
                    noneSelectedClass: 'fstNoneSelected',
                    multipleModeClass: 'fstMultipleMode',
                    queryInputClass: 'fstQueryInput',
                    queryInputExpandedClass: 'fstQueryInputExpanded',
                    fakeInputClass: 'fstFakeInput',
                    controlsClass: 'fstControls',
                    toggleButtonClass: 'fstToggleBtn',
                    activeClass: 'fstActive',
                    itemSelectedClass: 'fstSelected',
                    choiceItemClass: 'fstChoiceItem',
                    choiceRemoveClass: 'fstChoiceRemove',
                    userOptionClass: 'fstUserOption',

                    resultsContClass: 'fstResults',
                    resultsOpenedClass: 'fstResultsOpened',
                    resultsFlippedClass: 'fstResultsFilpped',
                    groupClass: 'fstGroup',
                    itemClass: 'fstResultItem',
                    groupTitleClass: 'fstGroupTitle',
                    loadingClass: 'fstLoading',
                    noResultsClass: 'fstNoResults',
                    focusedItemClass: 'fstFocused',

                    matcher: null,

                    url: null,
                    loadOnce: false,
                    apiParam: 'query',
                    initialValue: null,
                    clearQueryOnSelect: true,
                    minQueryLength: 1,
                    focusFirstItem: false,
                    flipOnBottom: true,
                    typeTimeout: 150,
                    userOptionAllowed: false,
                    valueDelimiter: ',',
                    maxItems: null,

                    parseData: null,
                    onItemSelect: null,
                    onItemCreate: null,
                    onMaxItemsReached: null,

                    placeholder: 'Choose option',
                    searchPlaceholder: 'Search options',
                    noResultsText: 'No results',
                    userOptionPrefix: 'Add '

                };