jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.Checkbox
Search:
 
Filters

static Class jsbeans.Checkbox

A collection of utilities for checkbox inputs

Methods

getSelected

static Array getSelected ( [options] )
Returns all checked checkboxes based on {@param} options.
Note that if {@param} options is empty all checked checkboxes in page will be returned.
Parameters:
[options] <JSON> an optional filter in JSON format to filter only checkboxes by their name or if the checkbox's id starts with a given string.
Returns: Array
checked checkboxes

selectAll

static Array selectAll ( object , [options] )
Selects all checkboxes based on checked attribute of given object (so it can be a JSON too) and returns all selected items.
Parameters:
object <DOM | Object | JSON> an object with a checked attribute
[options] <JSON> an optional filter in JSON format to filter only checkboxes by their name or if the checkbox's id starts with a given string. An optional forceSelection attribute (boolean default to 'false') will force the selection of disabled checkboxes.
name: <String>, // the value of attribute 'name'. It filters only those checkboxes with given name. Optional.
startsWith: &l;String>, //  It filters only those checkboxes with the first part of attribute 'id' matching this value. Optional.
forceSelection: &l;boolean> // forces the selection of disabled checkboxes. Default false.
Returns: Array
checked checkboxes


Copyright © 2016 Francesco Mele. All rights reserved.