Log in
Log in with USB
Inloggen met vingerafdruk wordt binnenkort mogelijk.
Last change: September 20, 2019
Current version: 1.0.1
The module groupButtons changes a selection of DOM elements into group buttons. Based on a given Webanizr variabele only on of the elements in the selection can be "selected" at any given time.
webanizr.collect('groupButtons', parameters, callback);
The groupButtons module accepts the following parameters:
The query selector defining which DOM elements are in this group.
The variabele name used to indicate which of the elements is selected
The way the module determines which element is currently selected. At this point, only one option is supported:
If this parameter is not set, numeric selection will be used.
The way the module displays selected and not-selected elements:
If this paramaters is not set, the class method is used.
The currently selected node. Eg. when numeric selection is used; setting this value to 2 means the second node is selected.
The name of the class that is applied to the selected node. If this parameter is not set, the class "selected" is used.
The name of the class that is applied to the not selected nodes. If this parameter is not set, the not selected nodes do not get a class.
The event that has to occur at a node to make it selected. Eg. setting this paramater to "click" means that a click on the node selects it.
The callback is called after the nodes have been turned into a button group. The callback function is called with empty data.
Using the groupButtons plugin to create a tab structure:
https://cdn.cpmodules.webanizr.com/demo/group-buttons/index.html