i want to view image as tooltip of small image on mouseover on that so what is the code for that?using javascript how it can be done?

i want to view image as tooltip of small image on mouseover on that so what is the code for that?using javascript how it can be done?

This does seem a bit out of place for the php forum... and I'm not sure what the code is to do it in Javascript.

However, you can do this with plain CSS.

Here's the basic premise:

You wrap the text you want to "mouse-over" in an anchor tag, without any href element. It helps to use a separate class of anchor tags, like "info".

You create a span element within that anchor tag. By default, the css for that span (a.info span) would be display:none.

When you mouse-over the anchor, you change the span's display to block (a.info:hover span {display:block}). You'd also want to give the span element a "position: relative" declaration, so that it appears on top of the text instead of running into the surrounding text.

Don't have a full tutorial handy, but that's the basic concept. It's pretty nifty when it's all done. Pure CSS, no Javascript required. It works fine with text, so I'd think that you could put an img tag inside the span tag and have it work just fine as well.

- Walkere

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.