|
|
Trying to do a mouse-over floating preview
I'm trying to make use of one of those popular scripts you see all over
the web these days, where you mouse over a image or link and you get a
floating preview of something before you click it.
Basically, if you go to www.templatemonster.com and mouse over a
template, that's the exact effect I want. So I viewed their source, and
saw that they got the script from here:
http://www.javascriptkit.com/script/script2/simpleimagetrail.shtml
But they greatly modified it. If you check out the script from
javascriptkit.com, it just makes the image visible at all times. I
modified it to perform as I want, which you can see here:
http://abate.veritynet.net/~d77/float
You can see I got it doing exactly what I want, but now let's say I
want the effect to happen for 2 different pics on the same page. I
wouldn't know where to begin.
Again, I tried viewing the templatemonster source. In fact I tried
"borrowing" it. But I just can't get it to perform like they have it. I
downloaded all their .js files and recreated the same directory
structure, but I'm just missing something somewhere. Besides, I dont
want to just steal someone else's work. But I do want to get it working
like that.
Anyone have and pointers, or know of another free script out there that
will perform this effect? TIA
|
|
0
|
|
|
|
Reply
|
yerk5 (8)
|
9/17/2006 4:16:10 PM |
|
yerk5@hotmail.com wrote:
> http://www.javascriptkit.com/script/script2/simpleimagetrail.shtml
>
> But they greatly modified it. If you check out the script from
> javascriptkit.com, it just makes the image visible at all times. I
> modified it to perform as I want, which you can see here:
>
> http://abate.veritynet.net/~d77/float
>
> You can see I got it doing exactly what I want, but now let's say I
> want the effect to happen for 2 different pics on the same page. I
> wouldn't know where to begin.
this is what they do:
function gettrailobj(){
if (document.getElementById)
return document.getElementById("preview_div").style
}
but this is what you do:
function gettrailobj(){
if (document.getElementById)
return document.getElementById("trailimageid").style
else if (document.all)
return document.all.trailimagid.style
}
You're getting the style for the image itself, whereas they are getting
the style for the preview div. I didn't look at it too closely, but I
assume that they are putting different images in the preview div
depending on what is being moused over.
Your method, getting the image style, is flawed because it only allows
for one image to be on the page. Their method works better. They only
have one preview div on the page, but they can move different images
into and out of it easily enough.
|
|
0
|
|
|
|
Reply
|
Jake
|
9/18/2006 12:17:27 AM
|
|
|
1 Replies
104 Views
(page loaded in 0.05 seconds)
Similiar Articles: moving in 3D - comp.lang.c++... SourcesPos[i][0] =3D -float(cos(theta)); //not ok if i do: -0 ... I'm trying to pick a point in 3d space using the mouse, and then move the ... gimp... or move one image over ... How to clear an object plot - comp.lang.idl-pvwaveWhen the user moves his mouse over this image, the z vs x ... data in the plot IDL> help,d D FLOAT ... clear subject line, a clear ... Hi, I'm trying to make ... What software to render a bead or tile pattern from a scan? - comp ...Do you have a sample of what it is you are trying to ... to do all of this except combining the preview and ... over an > appropriate set of pixels. Put your mouse of the ... Volume Rendering - comp.graphics.api.openglHaving a free-floating clipping plane ... the camera by dragging on the preview windows or clicking left(forward) or right(back) over ... I am trying to use 2D texture and 3D ... Sampling: What Nyquist Didn't Say, and What to Do About It - comp ...I sampled over many line > cycles, stuck the ... page _____ the cat is shown eating the mouse ... > >When I do technical presentations, I try to silently impose >a structure ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... Panorama question - comp.graphics.apps.paint-shop-proThanks in anticipation Gerry >> >> Try Panorama ... co-ordinates displayed there as you >> move your mouse over ... the whole layer to get deformed, you can make a floating ... VICE 2.3 has been released. - comp.sys.cbm* Emulation of floating waveform DAC input for ... be operated without holding the >>> mouse ... RFC2217, so I would prefer that > over a VICE-specific solution. Do you ... '?'s in Rom Firmware Kernal dumps - comp.sys.cbm> > (I prefer using x86 over 64-bit because there are many ... of those beasts has to know how to operate the mouse ... quick project to do on here (utility) and I will try to do ... top 10 uses for random data compression?? anyone? - comp ...Everyone signal ethnic greens, do you estimate them? I was trying to suck ... For Ronette the slope's sheer, over me it's ... Others necessarily float. Many whole genetic ... Preview of content on mouse over [Archive] - Dynamic Drive Forums[Archive] Preview of content on mouse over HTML ... code, on mouse over, the word "Tutorial" came out. What I'm trying to do is is on mouse ... thread and the floating ... Excel - Can You Have Floating Picture Preview When Using ...... the file, I want to show a preview picture in the floating box when I hover the mouse over the link. Is there a way to do ... make this work instead of trying to start over! 7/22/2012 6:08:49 AM
|
|
|
|
|
|
|
|
|