How could I implement an image preview feature like Google image search result, when clicked on a thumbnail, Google shows a preview of website on the background and preview of the image on the foreground.
Is that possible to use Lightbox/Fancybox (or a clone of them) and iframe options? Do you have any suggestions or solutions?
making this type of lightbox is easy. You don’t necessarily need to use Lightbox/Fancybox.
there are actually many examples of this online that you could use for a model…for instance I just found this one
http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/
what I generally do for this type of pop-up-like thing is make a div with the following properties:
this will cover the page with a semi-transparent layer, or curtain
what I generally do to display the curtain is attach a function that sets “display:none” to “display:block” ( or alternatively, uses jquery’s .toggle() ) to a click event somewhere on the page.
make sure that the contents of the pop-up are also initialized as display:none; in the css
I would then put the image inside the div, and position it with position: absolute;
I used this type of curtain/pop-up here on this page…http://asdf.us/imgrid/greatgrids
click “select, then click here for details”
EDIT : after reading your comment, I realize that this is more about using iframes WITH lightboxes. I would be careful using iframes, because some sites (like stackoverflow.com, for example) disallow iframe linking. Try this example below: