Solved

How to create a thumbnail to display a larger version image and visa versa?

Posted on 2014-03-13
5
187 Views
Last Modified: 2014-03-16
I want to create a thumbnail that uses a link to display a larger version of the image and than a link to display the thumbnail again. I can create the thumbnail to display the larger image, but not visa versa. How do I go about doing that?
0
Comment
Question by:Barbara69
  • 2
  • 2
5 Comments
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 39928533
Why not just use a lightbox library - which does exactly that?
0
 

Author Comment

by:Barbara69
ID: 39930412
I checked out lightbox, but it doesn't toggle the images. I want to be able to toggle between the thumbnail image and the larger image.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 39930974
Lightbox creates an "overlay" on top of the page into which the image is loaded.  If it is loaded full screen you can set the transparency so that it either completely obscures the page below or allows you still to see some of it, and there should be an "X" somewhere in the white frame around the image to close the overlay and revert back to the page with the thumbnail.  You can also configure it to just load the overlay at a nominated size on top of the page, with the "X" button to close it and revert to the page.  Some stylings of this effect don't have the intuitive "X" and rely on you discovering that if you click the image anywhere it closes the overlay.

You could configure a lightbox "slideshow" containing only two images, the thumbnail and the main image, and the back and forward arrows could be used to "toggle" the views.

Isn't your thumbnail image part of a page that contains other content?

If the main image was loaded in the same page using a standard hyperlink on the thumbnail, the browser's back and forward buttons would "toggle" between the page with the thumbnail and the main image on its own.

There are some fancy CSS effects that allow you to mouseover areas on a page and it shows a popover effect.  Maybe that's what you're looking for?

Simply toggling between a thumbnail and large image doesn't really make any sense to me.  Could you explain a little more about your actual objective so we can perhaps advise the most appropriate method to suit your needs.
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39931130
Can you post what you have done already - I am not sure I understand the difference between what you want to do and what a lightbox does?
0
 
LVL 38

Expert Comment

by:BillDL
ID: 39932297
Hi Barbara
I'm curious to know what changed.  You said that LightBox didn't do what you wanted, but you selected the suggestion as your solution.  It's always helpful for us to get some feedback.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now