Options
Class used to handle a set of multiple radio buttons (<input type="radio">).
Example:
// Given the following set of HTML radio buttons:
// <input type="radio" name="graph_type" value="pos">
// <input type="radio" name="graph_type" value="vel">
// <input type="radio" name="graph_type" value="accel">
var graph_type = new Options("graph_type", function(val) {
console.log(val);
});
Constructor Summary
Public Constructor | ||
public |
constructor(name: string, onChange: function) |
Member Summary
Public Members | ||
public |
Sets the id of the input using the name as an argument. |
|
public |
jQuery reference to the input. |
|
public |
Callback function for when a radio button is selected. |
|
public |
Value of the currently selected radio option. |
Method Summary
Public Methods | ||
public |
Enables or disables the radio options. |
|
public |
Selects a radio button using its value. |
Public Constructors
Public Members
public name: string source
Sets the id of the input using the name as an argument. This id is then used to obtain the jQuery object of the input.