How can I test if a mouse is within a given div? I know how to use events to do something when it occurs but is it possible to check it on pageload only?
What I want to do is smething like:
if(mouse is in specified div) {
check = true;
} else {
check = false;
}
Thanks,
Denis
This will work on the first hover over the div and then never again. Do you want to check only if the mouse is over the div immediately on page load or just the first time the mouse hovers over it? If you want the former, it might be a little trickier, but check out this SO post to see how to do it.