I have a collection of divs with the same class at various positions on a larger div. Is there a way, using jQuery, to determine if any divs are overlapping a given position on the screen?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Read the section on document.elementFromPoint(): http://www.quirksmode.org/blog/archives/2010/06/more_ie9_goodne.html
You can use this to find the “top-most” element at that location. Hide that element, then ask again. If you get another hit, then the 2 divs overlap at that position.