jquery.position() isn't working correctly.

Posted by devzero on Stack Overflow See other posts from Stack Overflow or by devzero
Published on 2010-04-21T06:30:52Z Indexed on 2010/04/21 6:33 UTC
Read the original article Hit count: 156

Filed under:
|

I'm working on a menu system where I want a ul to show as a dropdown when the users does a mouseOver on li in another ul. I thought I'd use position to set the position of the dropdown (so it actually looks like a menu). What I want is the dropdown's top left corner to start at the same place as the bottom left corner of the wrapping listitem.

Unfortunately the positioning fails in several different ways:

  • In Firefox it seems like the dropdown's are offset with approximately -100 25 pixels
  • the first item in the list has a different offset on the left side compared to the other items
  • The offset in IE is not the same as in FF
  • Doing the positioning repeatedly in explorer results in different positions each time.

I've created a test page where you can see the effects: http://test.evju.biz/test/test_position.html

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about positioning