|
Webpage
Jan 26, 2011 0:08:24 GMT -4
Post by lukepemberton on Jan 26, 2011 0:08:24 GMT -4
I want an image to pop up, and the disappear when the user moves the cursor away. Does anyone know how to make an image pop up when hovering over text? Does it rely on some sort of Java code, or can I do it in html. I cannot find it in my java or html bibles I'm sure that I have done it before, but cannot seem to do it now... even more
|
|
|
Webpage
Jan 26, 2011 0:14:43 GMT -4
Post by LunarOrbit on Jan 26, 2011 0:14:43 GMT -4
You might be able to do something like that with just HTML and CSS. I've never tried that before... give me a few minutes and I'll try to figure it out.
|
|
|
Webpage
Jan 26, 2011 1:13:35 GMT -4
Post by BertL on Jan 26, 2011 1:13:35 GMT -4
Sounds like you can do it with just HTML and CSS. Here's a page showing an example (and the code used)... www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/If you want the popup to actually follow your mouse when you're hovering over the image (or being relative to the mouse rather than the thumbnail), then you will need to add some JavaScript to keep track of the mouse and keep the popup positioned relative to the mouse.
|
|
|
Webpage
Jan 26, 2011 1:28:30 GMT -4
Post by LunarOrbit on Jan 26, 2011 1:28:30 GMT -4
Cool link, Bert. I knew that must be possible but I wasn't able to make it work on my own. I did find a Javascript and CSS combination that works, but HTML and CSS is simpler and won't break if a visitor has disabled Javascript. Here's what I was able to do though: www.apollohoax.net/popuptest/
|
|
|
Webpage
Jan 26, 2011 2:31:41 GMT -4
Post by lukepemberton on Jan 26, 2011 2:31:41 GMT -4
Thanks. I can't get it to work right now, but I think that is the provider I am using. I'll try and run it on my machine as a stand alone script, and see if I can get it to run for me that way.
|
|
|
Webpage
Jan 26, 2011 4:19:38 GMT -4
Post by BertL on Jan 26, 2011 4:19:38 GMT -4
Cool link, Bert. I knew that must be possible but I wasn't able to make it work on my own. I did find a Javascript and CSS combination that works, but HTML and CSS is simpler and won't break if a visitor has disabled Javascript. Here's what I was able to do though: www.apollohoax.net/popuptest/I quite like your script as well, although for some reason my pointer doesn't change when I mouse over the link. (Perhaps it has something to do with the tag saying ' href"#thumb" ' instead of ' href="#thumb" '? )
|
|
|
Webpage
Jan 26, 2011 15:04:51 GMT -4
Post by LunarOrbit on Jan 26, 2011 15:04:51 GMT -4
I quite like your script as well I can't take all the credit for it. It's something I found using Google, but I modified it to show the image (the original script displayed text in the popup box). Oops... I didn't notice that. I've fixed it.
|
|
|
Webpage
Jan 26, 2011 15:28:54 GMT -4
Post by BertL on Jan 26, 2011 15:28:54 GMT -4
Works perfectly now. Love it.
|
|