Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQueryUI tooltip jumps around

Tags:

jquery

tooltip

When I repeatably scroll over an element the jQuery tooltip seems to jump around. I thought maybe it was because it was colliding with itself, so I set the collision option to none but that didn't help.

Is this a bug? How can I get it to not jump around?

like image 886
happygilmore Avatar asked May 22 '13 13:05

happygilmore


2 Answers

I set the .ui-tooltip class to have position: absolute it seems to have worked, not sure if there will be unwanted consequences though?

like image 198
happygilmore Avatar answered Oct 27 '22 08:10

happygilmore


It seems that happygilmore's method no longer works (and as he said, is also a risky approach). I suggest using the Tooltip Widget API by setting the following options:

position: {
    collision: 'none'
},
hide: false

The collision: none option stops jQuery UI from trying to do anything fancy to resolve collisions and hide: false stops it from using a fade animation to slowly remove the tooltip; the delay of which causes the collision to occur in the first place. In my opinion it looks just fine without the fade animation.

like image 34
DIMMSum Avatar answered Oct 27 '22 08:10

DIMMSum