As you can see, Tool-tip #1 will display below the text if it is near the top edge of the browser window.
Tool-tip #2
shows that the tooltip will not pop up off the screen.
Tool-tip #3 shows that the tool-tip will not pop up off the left edge of the browser window.
This page shows examples of the code described in this article: Javascript Tool-tips