SliderItem.Moved

Syntax

Moved: function(sender, args, timeout);

Parameters

sender. Event source.

args. Event information.

timeout. Time delay (milliseconds) after which the event is fired.

Description

The Moved event is fired when slider position finishes changing.

Example

To execute the example, the page must contain the Slider component named slider (see Example of Creating the Slider Component). Handle the following events: Moved, Moving, ValueChange, ValueChanged, ValueChanging:

// Get slider with the 0 index
var sliderItem = slider.getItemByIndex(0);
// Determine checkboxes of events fire
var movingRaised = false;
var valueChangeRaised = false;
var valueChangingRaised = false;
// Propcess the Moved event
sliderItem.Moved.add(function (sender, args, timeout) {
    console.log("The Moved event is initialized")
});
// Handle the Moving event
sliderItem.Moving.add(function (sender, args, timeout) {
    // Display the message about the event firing only one time
    if (!movingRaised) {
        console.log("The Moving event is initialized")
        movingRaised = true;
    }
});
// Handle the ValueChange event
sliderItem.ValueChange.add(function (sender, args, timeout) {
    // Display the message about event firing only one time
    if (!valueChangeRaised) {
        console.log("The ValueChange event is initialized")
        valueChangeRaised = true;
    }
});
// Handle the ValueChanged event
sliderItem.ValueChanged.add(function (sender, args, timeout) {
    console.log("The ValueChanged event is initialized")
});
// Handle the ValueChanging event
sliderItem.ValueChanging.add(function (sender, args, timeout) {
    // Display the message about event firing only one time
    if (!valueChangingRaised) {
        console.log("The ValueChanging event is initialized")
        valueChangingRaised = true;
    }
});

Move the component's left slider.

After executing the example the browser console displays messages informing that the handled events are fired:

The ValueChange event is initialized

The ValueChanging event is initialized

The Moving event is initialized

The ValueChanged event is initialized

The Moved event is initialized

See also:

 SliderItem