Skip to content

Commit 24e615e

Browse files
committed
add info about operations in README
1 parent 3987565 commit 24e615e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,19 @@ jQuery('#multiple-input').on('afterInit', function(){
382382
});
383383
```
384384

385+
## JavaScript operations
386+
Dynamically operations in widget:
387+
- `add`: adding new row, **param** *object*: object with values for inputs, can be filled with <option> tags for dynamically added options for select (for ajax select).
388+
- `remove`: remove row, **param** *integer*: row number for removing, if not specified then removes last row.
389+
- `clear`: remove all rows
390+
391+
Examples:
392+
```js
393+
$('#multiple-input').multipleInput('add', {first: 10, second: '<option value="2" selected="selected">second</option>'});
394+
$('#multiple-input').multipleInput('remove', 2);
395+
$('#multiple-input').multipleInput('clear');
396+
```
397+
385398
##Renderers
386399

387400
> Section is under development

0 commit comments

Comments
 (0)