currentIndex


currentIndexnumberRead-only

Gets the index of the gallery's current item.

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.

Did this help?