开发者

why is this tooltip following the opposite vertical direction?

开发者 https://www.devze.com 2023-03-31 14:00 出处:网络
I\'m developi开发者_运维知识库ng a \'home-made\' tooltip using Jquery and CSS, Seems to work OK,

I'm developi开发者_运维知识库ng 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?


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/


you are using bottom, not top.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消