jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.Table
Search:
 
Filters

static Class jsbeans.Table

Table utilities

Methods

filter

static void filter ( search , head , [min] )
Hides rows of a Table based on {@param} search
Parameters:
search <String> the search term or phrase
head <DOM | String> the TH DOM Element, or its id, containing the filter
[min] <Integer> filter fired if value.length >= min. Default 0
Returns: void

select

static DOM select ( node , [options] )
Selects table element {@param} node (column, row, cell or column+row) based on value of {@param} options.
It switches selection on every invocation. Use {@method} selectOn or {@method} selectOff to force a selection mode.
Parameters:
node <DOM> a table DOM element
[options] <JSON> a JSON
what: ['column' | 'tr' | 'td' | 'both'], // optional, default 'td'
className: a_class_name // optional, define style class to use on selection, default 'selected'
Returns: DOM
selected DOM Object

selectOff

static DOM selectOff ( node , [options] )
Turns off a previous selection by {@method} select or {@method} selectOn
Parameters:
node <DOM> a table DOM element
[options] <JSON> a JSON
what: ['column' | 'tr' | 'td' | 'both'], // optional, default 'td'
className: a_class_name // optional, define style class to use on selection
Returns: DOM
selected DOM Object

selectOn

static DOM selectOn ( node , [options] )
Selects table element {@param} node (column, row, cell or column+row) based on value of {@param} options.
Parameters:
node <DOM> a table DOM element
[options] <JSON> a JSON
what: ['column' | 'tr' | 'td' | 'both'], // optional, default 'td'
className: a_class_name // optional, define style class to use on selection, default 'selected'
Returns: DOM
selected DOM Object

zebra

static void zebra ( table , options )
An easy way to set rows with alternate style and a mouseover effect.
Parameters:
table <String | DOM> could be the id of a Table or the DOM Table Object itself
options <JSON> a JSON. Note that at least one of these options have to be used to make this method have sense
odd: a_class_name, // a style class for odd rows
even: a_class_name, // a style class for even rows
over: a_class_name, // a style class to applied on mouseover event fired. You can even use 'hover'.
Returns: void


Copyright © 2016 Francesco Mele. All rights reserved.