PDA

View Full Version : Displaying text on Mouseover



starlameris
07-08-2005, 01:47 PM
Hello again,

The question I have today is about something I'm not entirely sure is possible..and if it is I have absolutely no idea how to do it. :p So I'm appealing again to you javascript experts.

What I'd like to do on the page I'm currently working on is display a description of a product type on a mouseover. More specifically, the page will be the starting point for customers to look at various styles of cabinet doors. The names of the styles don't tell you much, but screen real estate is limited because we're trying to avoid scrolling on the site (don't ask). So I want to display a short paragraph about each type next to the menu, but only on the mouseover, so that there is only one paragraph shown at a time.

The best code I've found for this so far is featured here (http://www.gklein.org/tests/js/hide.html#d3a), but it apparently will not work in older browsers and will display ALL text fields at once, which of course would be a complete mess.

So, is there a good way to tell browsers that can't read the code to ignore it completely? Or is there a better way to do this to begin with?

Twey
07-08-2005, 05:39 PM
I recommend http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm.
Use onmouseover rather than onclick, and set collapseprevious to yes.
Apparently, it degrades fully in older browsers.

TinmanIII
07-09-2005, 06:48 AM
Twey recommended a good script,

I like this one,because I'm lazy haha, you can customize of course do a full menu if you wish, as well as pick your colours etc.

http://www.dynamicdrive.com/dynamicindex5/popinfo2.htm