Merge remote-tracking branch 'origin/master'

This commit is contained in:
Josh Johnson 2016-10-22 21:05:33 +01:00
commit d6f34fc70e
2 changed files with 86 additions and 80 deletions

View file

@ -14,11 +14,15 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
* Custom templates * Custom templates
## Installation ## Installation
With [NPM](https://www.npmjs.com/package/choices.js):
`npm install choices.js --save` ```bash
npm install choices.js --save
## Setup ```
With [Bower](https://bower.io/):
```bash
bower install choices.js --save
```
Or include Choices directly:
```html ```html
<!-- Include base CSS (optional) --> <!-- Include base CSS (optional) -->
<link rel="stylesheet" href="assets/styles/css/base.min.css"> <link rel="stylesheet" href="assets/styles/css/base.min.css">
@ -26,7 +30,10 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
<link rel="stylesheet" href="assets/styles/css/choices.min.css"> <link rel="stylesheet" href="assets/styles/css/choices.min.css">
<!-- Include Choices JavaScript --> <!-- Include Choices JavaScript -->
<script src="/assets/scripts/dist/choices.min.js"></script> <script src="/assets/scripts/dist/choices.min.js"></script>
<script> ```
## Setup
```js
// Pass multiple elements: // Pass multiple elements:
const choices = new Choices(elements); const choices = new Choices(elements);
@ -64,7 +71,7 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
prependValue: null, prependValue: null,
appendValue: null, appendValue: null,
loadingText: 'Loading...', loadingText: 'Loading...',
noResultsText: 'No results round', noResultsText: 'No results found',
noChoicesText: 'No choices to choose from', noChoicesText: 'No choices to choose from',
itemSelectText: 'Press to select', itemSelectText: 'Press to select',
classNames: { classNames: {
@ -101,7 +108,6 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
callbackOnChange: null, callbackOnChange: null,
callbackOnSearch: null, callbackOnSearch: null,
}); });
</script>
``` ```
## Terminology ## Terminology

View file

@ -68,7 +68,7 @@ class Choices {
prependValue: null, prependValue: null,
appendValue: null, appendValue: null,
loadingText: 'Loading...', loadingText: 'Loading...',
noResultsText: 'No results round', noResultsText: 'No results found',
noChoicesText: 'No choices to choose from', noChoicesText: 'No choices to choose from',
itemSelectText: 'Press to select', itemSelectText: 'Press to select',
classNames: { classNames: {