How can I check whether the cursor is over a div on the html page with JQuery/Javascript?
I’m trying to get cursor coordinates to see if they are in the rectangle of my element. Maybe there are predefined methods?
UPD, don’t say anything about hover events, etc. I need some method which will return true/false for some element at the page, like:
var result = underElement('#someDiv'); // true/false
I’m not really sure why you wish to avoid hover so badly: consider the following script
Basically the idea is that you use hover to set a flag on the element that the mouse is over it/no longer over it. And then you write a function that checks for that flag.