isHover

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.is

Check if the mouse is isHover the passed HTMLElement

Params

  1. $elm*-HTMLElement

    The HTMLElement to check

Return

  1. -Boolean

    true if element is hover, false if not

Example

import { isHover } from '@blackbyte/sugar/is'
const $myElm = document.querySelector('.my-elm')
if (isHover($myElm)) {
  // do something
}

Todo

  • testsnormal