NameSilo

Need help in Javascript please, Image rollover for gallery

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back