문제

I have ran into what might be a unique problem. I've tried figuring it out, but can't find any evidence for what could be causing it. I am using Jquery UI tooltips in my web app. I need to manually position them. So what I do is position a 1px x 1px div where I want it, load up the content of the tooltip with custom HTML, and then open the tooltip. It works perfectly, except for under one case.

I also have a jquery ui accordian as my left side menu. When the first panel of the accordion is open, the tooltips work fine. They show up exactly where I want them. When any other accordion panel is open, the tooltips always show up in the upper left hand corner of the screen. The tooltip div has the correct position set in its css property, it just doesn't show up there.

도움이 되었습니까?

해결책 2

I feel dumb now. Should I delete this question?

My tooltip div was INSIDE the accordion, for unknown reasons. I don't remember who put it there, or why it ended up there. I moved it to the end of the document, and all works fine.

다른 팁

Without some code, I'm guessing. My guess is that you're positioning your 1x1 divs with JS, and because your accordion panels are {display: none} at that time, they have no size to reference for positioning.

You'll need to position your 1x1 divs after each accordion action,

OR

set your accordion panels offscreen, but not hidden, with {position: absolute; left: -999em; display: block;}

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top