shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
closestNotVisibleElement
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.query
Go up the dom three to find the first element that is not visible. Not visible mean that has either an opacity to 0, a visibility to hidden or a display to none
Params
- $elm*-HTMLElement
The element to start on
Return
- -HTMLElement | undefined
The element found or undefined
Example
import { closestNotVisibleElement } from '@blackbyte/sugar/dom'
const closestElm = closestNotVisibleElement($elm);
if (closestElm) {
// we have found en element that is not visible
}Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space