Slider.ItemTickIndex

Syntax

ItemTickIndex: Number

Description

The ItemTickIndex property determines index of the label positioned next to slider of the Slider component.

Comments

Use the setItemTickIndex method to set the property value, and the getItemTickIndex method to get the property value. Property value cannot be set from JSON.

The following three parameters are specified on calling the setItemTickIndex method: item - slider, value - label index, fireEvent - indication that the event is fired.

On calling the getItemActiveness method, specify only the parameter item - slider.

Example

To execute the example, the page must contain the Slider component named slider (see Example of creating the Slider component). Handle the ActiveItemChanged event, set slider with the index1 to position of the label with the index 1, activate slider with the index 0:

// Handle the ActiveItemChanged event
slider.ActiveItemChanged.add(function (sender, args, timeout) {
    console.log("The ActiveItemChanged event is initialized")
});
// Get a slider with index 1
var sliderItem = slider.getItems()[1];
// Set slider with index 1 to position of the label
slider.setItemTickIndex(sliderItem, 1, true);
// Activate slider with index 0
slider.setLastActiveItem(slider.getItems()[0]);

After executing the example slider with the index 1 is set into position of the label with the index 1:

Also the browser console displays the message that the ActiveItemChanged event has fired:

The ActiveItemChanged event is initialized

See also:

 Slider