Skip to content

Instantly share code, notes, and snippets.

@tdreyno
Forked from anonymous/gist:431942
Created June 9, 2010 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdreyno/431944 to your computer and use it in GitHub Desktop.
Save tdreyno/431944 to your computer and use it in GitHub Desktop.
<script type="text/javascript" charset="utf-8">
/* Creat a div shell variable to house the screenshot. We will be creating this and destroying this every time you click on a thumbnail link */
var $tempDiv = $('<div id="screenshot" class="popup">' +
'<a class="close pngfix"></a>' +
'<div></div>' +
'</div>');
/* No touchy */
/* This will lightbox_me the tempDiv declared above, and fill it with the image */
function loadImage() {
$tempDiv.find('div').css({"height": +"px", "width": +"px", "padding": 20px})
};
$tempDiv.lightbox_me({
centered: true,
destroyOnClose: true
});
}
$('a.thumbnail').click(function() {
var imageUrl = $(this).attr("src").replace("_thumb", "_full");
var newDiv = $tempDiv.clone();
newDiv.find("div").append("<img src='" + imageUrl + "' />");
newDiv.lightbox_me({
centered: true,
destroyOnClose: true
});
return false;
});
</script>
<a href="#" class="thumbnail"><img src="/files/images/newway/thumb-apps.jpg" class="border" /></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment