jQuery-Spotlight
jQuery-Spotlight copied to clipboard
Offset() vs Position()
Hi, I had a problem when I added padding to a div inside a wrapper; spotlight would not detect the correct position and omitted the padding (showed the lighted box upper than where it should have been). I checked the source code and replaced position() with offset() which solved the issue. So it appears that it's better if spotlight checks for the parent element and if it's , then it should switch to more accurate and reliable offset() rather than the relative position() which may return wrong values. Thanks