Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit ce5dd2e

Browse files
committed
Updated readme.
1 parent ccfaf41 commit ce5dd2e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A simple and lighweight jQuery plugin for creating cascading dropdowns.
77
## Installation
88

99
```
10-
bower install --save jquery-cascading-dropdown
10+
npm install --save jquery-cascading-dropdown
1111
```
1212

1313
Include script after the jQuery library (unless you are packaging scripts somehow else):
@@ -227,4 +227,19 @@ $('#dropdown').cascadingDropdown('destroy');
227227

228228
By default, this plugin expects the web service to return a JSON object containing an array of objects with properties 'label' and 'value'. The web service may also include a 'selected' property for an object within an array to indicate that that particular object is to be the selected item.
229229

230+
```json
231+
// Example server response
232+
[
233+
{
234+
"label": "Item 1",
235+
"value": "1"
236+
},
237+
{
238+
"label": "Item 2",
239+
"value": "2",
240+
"selected": true
241+
}
242+
]
243+
```
244+
230245
If the value property is not defined, the dropdown item will set the label as the value, and vice versa.

0 commit comments

Comments
 (0)