diff --git a/README.md b/README.md index 2386028..9be03f6 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ A lightweight, configurable select box/text input plugin. Similar to Select2 and | Group | A group is a collection of choices. A group should be seen as equivalent to a `` element within a select input.| | Item | An item is an inputted value (text input) or a selected choice (select element). In the context of a select element, an item is equivelent to a selected option element: `` whereas in the context of a text input an item is equivelant to ``| + ## Configuration options ### items Type: `Array` Default: `[]` @@ -383,6 +384,18 @@ choices.setValue(['Set value 1', 'Set value 2']) choices.disable(); ``` +### destroy(); +Input types affected: `text`, `select-multiple`, `select-one` + +Usage: Kills the instance of Choices, removes all event listeners and returns passed input to its initial state. + +### init(); +Input types affected: `text`, `select-multiple`, `select-one` + +Usage: Creates a new instance of Choices, adds event listeners, creates templates and renders a Choices element to the DOM. + +Note: This is called implicitly when a new instance of Choices is created. This would be used after a Choices instance had already been destroyed (using `destroy()`). + ### highlightAll(); Input types affected: `text`, `select-multiple`