Google interview question

How to implement the solution for a mouse cursor which will look for a selector around the cursor area?