Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Update README.md - Adds MultiSelect option, Select All, and fixes HTML5 search type X-to-clear button. #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ $('.your-select').fSelect({
overflowText: '{n} selected',
noResultsText: 'No results found',
searchText: 'Search',
showSearch: true
showSearch: true,
showSelectAll: true,
multiSelect: false
});
```

Expand All @@ -28,6 +30,8 @@ $('.your-select').fSelect({
* **noResultsText** (str) - the text to show if no choices exist (or an empty string)
* **searchText** (str) - the search box placeholder text
* **showSearch** (bool) - show the search box?
* **showSelectAll** (bool) - show select-all option? (only with multiSelect)
* **multiSelect** (bool) - initialize with multi-select enabled (works the same as select attribute)

### Methods

Expand All @@ -38,7 +42,7 @@ $('.your-select').fSelect('destroy');

### Single vs. multi-select

Add the `multiple` attribute to your `<select>` to enable multi-select:
Add the `multiple` attribute to your `<select>` to enable multi-select (optional; can set in fSelect options OR in select tag):

```html
<select class="your-select-box" multiple="multiple">
Expand Down