Capítulo 136 de 411
getUnit() extracts the unit suffix from a string where a number comes first, then a unit.
| Parameter | Type | Description |
|---|---|---|
value | String | value to extract the unit from |
Returns: String.
gsap.utils.getUnit("50%"); // "%"
gsap.utils.getUnit("100vw"); // "vw"