Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Display image when mouseover on anchor (http://www.velocityreviews.com/forums/t636535-display-image-when-mouseover-on-anchor.html)

Hvid Hat 09-22-2008 08:22 PM

Display image when mouseover on anchor
 
Hi

I'd like to display an image when mouseover on an anchor. The image should be
shown where the anchor is located and I don't want a popup window. It should
also disappear once the mouse leaves the image.

<a onmouseover="">move mouse here to see image</a>

Is this possible? I've searched but I haven't found anything useful.

Sherm Pendley 09-22-2008 08:34 PM

Re: Display image when mouseover on anchor
 
"Hvid Hat" <hvid.hat@please-no-mail.thx> writes:

> I'd like to display an image when mouseover on an anchor. The image should be
> shown where the anchor is located and I don't want a popup window. It should
> also disappear once the mouse leaves the image.
>
> <a onmouseover="">move mouse here to see image</a>
>
> Is this possible?


It's easy with JavaScript, but keep in mind that not everyone will
allow that, so it's not a good idea to use it for anything that's
required for your page to work. If the image is a non-essential
convenience, like a thumbnail of the full-size image the link leads to
or some such, go for it.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net

Hvid Hat 09-22-2008 09:12 PM

Re: Display image when mouseover on anchor
 
On 22-09-2008 22:34:45, Sherm Pendley wrote:
> "Hvid Hat" <hvid.hat@please-no-mail.thx> writes:


> It's easy with JavaScript, but keep in mind that not everyone will
> allow that, so it's not a good idea to use it for anything that's
> required for your page to work. If the image is a non-essential
> convenience, like a thumbnail of the full-size image the link leads to
> or some such, go for it.


The image is non-essential. I've got a table of football players and as the
last column I want an anchor that shows a player image on mouseover. I've
been looking for a simple javascript solution without luck. I've been looking
at Lightbox etc. but isn't that overkill?

Roy A. 09-22-2008 09:49 PM

Re: Display image when mouseover on anchor
 
On 22 Sep, 22:22, "Hvid Hat" <hvid....@please-no-mail.thx> wrote:
> Hi
>
> I'd like to display an image when mouseover on an anchor. The image should be
> shown where the anchor is located and I don't want a popup window. It should
> also disappear once the mouse leaves the image.
>
> <a onmouseover="">move mouse here to see image</a>


The attribute onmouseover tells me that this is an javascript
question. Pleas
ask this kind of questions to a group like comp.lang.javascript or
alt.comp.lang.*javascript.

However, if JavaScript is disabled, you can use CSS.

<a onmouseover="">move mouse here to see image<img ...></a>
a img { position: absolute; visibility: hidden }
a:hover img { visibility: visible }

>
> Is this possible? I've searched but I haven't found anything useful.



Hvid Hat 09-22-2008 10:20 PM

Re: Display image when mouseover on anchor
 
On 22-09-2008 23:49:12, "Roy A." wrote:

> However, if JavaScript is disabled, you can use CSS.
>
> <a onmouseover="">move mouse here to see image<img ...></a>
> a img { position: absolute; visibility: hidden }
> a:hover img { visibility: visible }


Very nice! Didn't even think of that. Thanks!


All times are GMT. The time now is 03:27 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57