getOffsetPosition
Commons
stable
Returns the offsetLeft or offsetTop pixel value of a SlideGroup element depending on the axis direction. Returns 0 when the element is undefined.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- isHorizontalrequisboolean
- When true, reads offsetLeft (horizontal axis); when false, reads offsetTop (vertical axis).
- elementHTMLElement
- The target element. When omitted, the function returns 0.
API
Valeur de retour
La valeur retournée par cet util.
- The offsetLeft or offsetTop value in pixels, or 0 if the element is absent.
Usage
Exemples
Extraits de code prêts à coller.
Read slide position in a horizontal track