📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Help with a Java script for images

Hi guys

If you take a look at

https://www.jessicamckeegan.co.uk/test.html

I want the EGs at the bottom to be thumbnails and without changing or refreshing the page the big pic comes up

Hope this makes sense?

Really desperate for some help

Thanks
I need a cig...
«1

Comments

  • bluboy
    bluboy Posts: 336
    Part of the Furniture Combo Breaker
    Forumite
    If you're happy with modifying the html/javascript yourself take a look here -
    http://javascript.internet.com/image-effects/onmouseover-image-gallery.html
    It does what you're trying to do.

    Look for the "Source Code" tab at the top of the page just above the pics and it will tell you what you need to add to the 'head' and 'body' sections of your source code. It's then just a matter of changing filenames to correspond with your own pictures.
    (edit - In the link they have used a small separate thumbnail image to represent each full size image that appears. )

    You could also preload your pictures to speed up the process when people hover over a thumbnail.
    I notice your thumbnails are 44x44 and your big pics are 560x328 so you would need to add the following into the <head> section of your code (remembering to change file names and repeating for how ever many pictures you want to preload) -

    <SCRIPT LANGUAGE="JavaScript">
    <!-- hide from none JavaScript Browsers

    Image1= new Image(560,328)
    Image1.src = "imagea.gif"

    Image2 = new Image(44,44)
    Image2.src = "imagea_sml.gif"

    Image3= new Image(560,328)
    Image3.src = "imageb.gif"

    Image4 = new Image(44,44)
    Image4.src = "imageb_sml.gif"
    // End Hiding -->
    </SCRIPT>
  • thank you

    ill give it a go!
    I need a cig...
  • hi!

    Ive managed to sort out some coding for the site.

    But the top navigation bar isnt visible until you actually click on an image?

    Im not sure why this has happened. Can someone advice?

    Thanks
    I need a cig...
  • sorted it

    realised i had

    $('.nav').css('display','none');

    in the code
    I need a cig...
  • A better and more popular way to work with thumbnails and galleries is to use a JavaScript lightbox.
  • ive looked at that and didnt like it
    I need a cig...
  • im having issues with the placement of the clicked image, can anyone help?
    I need a cig...
  • bluboy
    bluboy Posts: 336
    Part of the Furniture Combo Breaker
    Forumite
    mikem1986 wrote: »
    im having issues with the placement of the clicked image, can anyone help?
    Give me a minute and I'll have a look.
    Be warned it might be tomorrow before I have anything constructive to offer though! Too much white wine! At least I think its wine.

    In the meantime what do you want to see happen?
  • bluboy
    bluboy Posts: 336
    Part of the Furniture Combo Breaker
    Forumite
    Looks alright in Firefox but not in IE.
    But you've stepped into the world of prepacked JQuery - cant be much help I'm afraid.

    I thought the earlier version was much easier to follow and amend yourself.
  • just noticed about IE!

    argh!
    I need a cig...
This discussion has been closed.
★ ★ ★ Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 355.9K Banking & Borrowing
  • 255K Reduce Debt & Boost Income
  • 456.2K Spending & Discounts
  • 248.4K Work, Benefits & Business
  • 606.1K Mortgages, Homes & Bills
  • 179.1K Life & Family
  • 264K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.7K Read-Only Boards
Quick Search

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.