View Full Version : Mouseover Pop-up box?

6 Dec 2009, 5:56 AM
I am building a game with many terms, I would like to make it so if someone rolls over a word then a definition pops up right next to the word instantly like those word advertisements I see on other sites.

Is there a way to do this with Ext.js? I am mainly looking for a way to have the box pop up around the word/link. I can make box pop up somewhere, but I can't figure out how I would make it pop up right next to the word, and if there word was near the edge of the page then a piece of the box might go off page.

6 Dec 2009, 5:58 AM
Ext's ToolTip class handles constraining for you.

6 Dec 2009, 6:00 AM
you rock, thanks.

6 Dec 2009, 6:08 AM
Ok, one last question. What is the simplest way to use this? I think I can adjust it how I want if I figure out how to just get something going... I don't get how this is suppose to work at all after looking at the API Documentation for it.

I tried:


Then assigned id=150 to one of my links... where do I put what I want to pop up? Am i doing it right? i doubt it...

6 Dec 2009, 6:22 AM
Ok I got this now:
new Ext.ToolTip({
target: '150',
html: 'A very simple tooltip'

However I am now getting the error:
Ext.ToolTip is not a constructor.

what does that mean?

6 Dec 2009, 8:28 AM
I assume you are using Ext Core then, not ExtJs?

6 Dec 2009, 8:32 AM
Originally I used the Build your own Ext. I did it again with QuickTips and it worked. Thanks.