Jump to content

Mouseover Image Effect Thumbnail to Large Image Different Location on Page


dlebowski

Recommended Posts

I have gotten my script to do exactly what I want it to do with one exception.  I have some thumbnail images that people can mouse over and the actual image is 100px by 75px.  That is what I use for my thumbnail and they reside in www.website.com/images/thumbs/image1.jpg.  I have the large version of the image that resides in www.website.com/images/image1.jpg.  Its actual size is 640px by 480.  When I mouse over my thumbnail, I don't want the thumbnail to appear for the larger image, I want the large image to appear instead?  Let me know if you need ellaboration.  Any help would be great!  Thank you.

 

Javascript:

   <script language="JavaScript">
function Change_Big_One(thumb){
document.getElementById('BigOne').src=thumb.src.replace("_th","")
}
</script>

HTML THUMBNAIL:

<div><img src="https://www.website.com/images/thumbs/image1.jpg" class="thumb" onMouseOver="Change_Big_One(this)"></div>

 

HTML LARGER IMAGE:

<div><img src="" id="BigOne"></div>

Link to comment
Share on other sites

Hey abazoskib.  Thanks for the reply.  I do not have it assigned to more than one element.  For example, I have 6 thumbnails.  When I mouseover them, the <div> called "BigOne" changes.  I just basically don't want to have to use the full size images shrunk down as thumbnails.  Can you give me an example of how to do this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.