Jump to content

Mouseover function


shadowayex

Recommended Posts

I'm making a weapon chart for a game and I want to use the onmouseover function to make a little description box pop up. Kind of like you can set picture links to have a description thing using the alt="" attribute. How would I do that? By the way, the chart is in a table so I was gonna put the onmouseover in the <td> tags.

Link to comment
Share on other sites

I read through that. It gives a js page that you use. That's not quite that helpful because of the massive number of weapons and stuff. I wanted to make a function for each in a separate js file and have it called, but I tried looking through their code and seeing what I could take and use and I can't decipher it.

Link to comment
Share on other sites

That's what you need to use, you only include that file once. Each tag that you want a tooltip to appear on you use an onmouseover event to add the tooltip. e.g.:<a href="index.htm" onmouseover="Tip('Some text')" onmouseout="UnTip()">Homepage </a>That's a whole lot better then having a separate function for each item you want a tooltip to show up on.

Link to comment
Share on other sites

It doesn't matter if you remove the info from one place to keep it in another place, the browser will still have to download everything. In fact, it will take less time to download if it's all in one place because of less overhead on the requests.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...