Bootstrap slider event onslide()

The sample for the Bootstrap slider has this code:

Label1.textContent = Slider1.getValue();

// Capture the value as it changes:
// notice the nonstandard event name
 Slider1_input.onslide = function() {
     Label1.textContent = Slider1.getValue();

How do I add the .onslide event to the form? I tried typing it in - not recognized. Without it my slider not working.


Figured it out (not entirely clear on documentation).

  1. you have to type in the event by hand, adding a ‘_input’ in front of the event, after the control name.
    Example: if control name is mySlider:

mySlider_input.onslide = function() {



That makes sense. The id of the control (’mySlider’ in your case) is a wrapper for the actual HTML element with processes the slide. mySlider_input is the name of that element.

But the function is not triggered when I click with the mouse on a windows pc. How can I use the other events like onmousedown?
Function SliderNM_input_onmousedown() or Function SliderNM_input.onmousedown() will not be triggered.

Just tried it here, using the Slider sample.

If I click anywhere in the slider, the indicator moves and the value in the box gets updated. Am I doing this wrong?