jeudi 21 avril 2016

Check if mouse is inside div

I want to use an if statement to check if the mouse is inside a certain div, something like this:

if ( mouse is inside #element ) {
 // do something
} else {
 return;
}

This will result in the function to start when the mouse is inside #element, and stops when the mouse is outside #element.

Aucun commentaire:

Enregistrer un commentaire