Specific position for tooltip
- by Fiona
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!