0

I'm developing a 'home-made' tooltip using Jquery and CSS,

Seems to work OK,

http://jsfiddle.net/GLZFc/

It gets positioned ontop of the 'trigger' element (and horizontally centered), but when i move the mouse up it goes down and the opposite way,

what i'm I doing wrong?

Michael Easter
  • 23,733
  • 7
  • 76
  • 107
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378

2 Answers2

1

you are using bottom, not top.

http://jsfiddle.net/GLZFc/2/

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
1

Change "bottom:" to "top:" in your css assignments.

http://jsfiddle.net/GLZFc/1/

I also solved your question about the non-fading borders by prepending .find("span").andSelf() to the fadeIn and fadeOut methods. This will explicitly fade out all "span" tags inside the DIV, although I honestly don't understand why it's necessary (this might be a jQuery bug):

http://jsfiddle.net/GLZFc/21/

Blazemonger
  • 90,923
  • 26
  • 142
  • 180