Slider.MoveOnClick

Syntax

MoveOnClick: Boolean

Description

The MoveOnClick property determines whether the slider will move on clicking the Slider component.

Comments

Use JSON or the setMoveOnClick method to set the property value and the getMoveOnClick method to get the property value.

If the property is set to True, the slider will move on clicking, otherwise it will not.

The slider will move only when the Slider component has only one slider.

By default the property is set to False.

Example

To execute the example, the page must contain the Slider component named slider (see Example of Creating the Slider Component). Remove the slider with the 1 index, enable slider movement on mouse click:

// Remove slide with the 1 index
slider.removeItemByIndex(1);
// Set whether slide can move on mouse click
slider.setMoveOnClick(true);

Click on the component center.

After executing the example slider with the index 1 is removed, slider with the index 0 is moved to center of the Slider component:

See also:

 Slider