Need help in Javascript please, Image rollover for gallery

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch

diablostang

New Member
Impact
0
Hey, I need the Javascript code for the image rollovers that have a thumbnail, you rollover the thumbnail, and the fullsize appears below.... If that makes sense :P


Thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
What you need to do is something like this:

You have all your img tags in whatever way you want them to be, but with this attribute: onMouseover="swap(this.src)". Then you have your main image, something like so:

<img src="??" id="mainImg" />


Now in your head tag, you need a function, called swap (as referred to earlier):

<script language="JavaScript">

function swap(input)
{
var img = document.getElementById('mainImg');
img src = input;

}
</script>


That should do it, if it doesn't let me know...
 
0
•••
Truehost — .com domains from $4.99, hosting includedTruehost — .com domains from $4.99, hosting included

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back