YouTip LogoYouTip

Api Zindex

# jQuery UI API - .zIndex() ## Category (#) | (#) ## .zIndex() Usage **Description:** Gets the z-index for an element. **Returns:** (http://api.jquery.com/Types/#jQuery) .zIndex() This method does not accept any arguments. The `.zIndex()` method is useful for finding the z-index of an element, regardless of whether the z-index is set directly on the element or on an ancestor element. To determine the z-index, the method starts at the specified element and walks up the DOM until it finds an element with a z-index that is positioned. If no such element is found, the method returns a value of `0`. This method assumes that elements with nested z-indexes do not have a z-index of `0`. For example, given the following DOM, the inner element will be treated as not having a z-index, because in Internet Explorer it is not possible to distinguish between an explicit `0` value and no value.
## .zIndex( zIndex ) Usage **Description:** Sets the z-index for an element. **Returns:** (http://api.jquery.com/Types/#Integer) .zIndex( zIndex ) | Parameter | Type | Description | | --- | --- | --- | | zIndex | Integer | The z-index to set. | This is equivalent to `.css( "zIndex", zIndex )`.
← Api Data SelectorApi Uniqueid β†’