new SeveritySlider(args)
Slider to choose varying levels of severity for a rule violation
the container element will be set with a class of
"slider-left" or "slider-right" depending on whether the slider is
currently in the left- or right-hand side of the range.
Name | Type | Description |
---|---|---|
args |
Object | slider arguments |
Example
var slider = new SeveritySlider({
levels: [
{
html: 'no action', // shown when this level is selected
type: 'none', // or "PM" or "warning" or "infraction"
data: ..., // optional
},
...
],
value: 'no action', // HTML of default level
callback: function(level) { ... }, // called with the current level object
container: slider_appended_to_this
});
Extends
Methods
-
val(value){Object}
set the slider value
-
Name Type Description value
string value to set Returns:
Type Description Object new level