How can I check if the cursor is hovering on an element using JQuery

前端 未结 5 1026
离开以前
离开以前 2021-02-18 17:38

It possible to check if the cursor is hovering on an element.

Something like

 $(\"#divId\").is(\"hover\");

NOTE: I just want to check n

5条回答
  •  生来不讨喜
    2021-02-18 18:30

    Depending on what you are doing either mouseover() (http://api.jquery.com/mouseover/) or hover() (http://api.jquery.com/hover/) can be useful.

提交回复
热议问题