Search.../

currentIndex

Gets the index of the gallery's current item.

Description

The indices of the items in a gallery are zero-based. For example, if the third item is currently being displayed, then currentIndex returns 2.

Notes:

  • The currentIndex property is supported by galleries where the hasCurrentItem capability is true.

  • If you change the gallery's type to one that doesn't support currentIndex and you try to use it, your code may no longer function correctly.

Type:

numberRead Only

Was this helpful?

Get the index of the gallery's current item

Copy Code
1let currentIndex = $w("#myGallery").currentIndex; // 3