-
-
Save tdreyno/431944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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