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.

Thanks

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() {

}

Enjoy!

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.