Specific position for tooltip
Posted
by
Fiona
on Stack Overflow
See other posts from Stack Overflow
or by Fiona
Published on 2011-01-12T16:17:33Z
Indexed on
2011/01/12
16:54 UTC
Read the original article
Hit count: 178
JavaScript
Hello,
I have a layer which opens up as a tooltip everytime I hover a button. I simply did that by creating a JS function which displays or hides the layer.
Now, I am not a pro in JavaScript. My problem is the following: when the button is scrolled towards the top oft he screen I want the tooltip opening below – and if the button is near the bottom of the screen I want the tooltip opening above. Right now I just did it with absolute positioning. But obviously that doesnt do the trick.
Who can help? Thanks!
© Stack Overflow or respective owner