My index page have some records where each record have one or more images associated with it.
Under record description there are list of image thumbs. where I have onclick events binded to js function which clone that image in different height inside div showImage.
That's all fine.
Now I need to open that cloned image inside showImage div id in fullscreen mode using lightbox. Here's the code I'm having right now (it works but without fullscreen implementation)
<script type="text/javascript">
function onPopUp() {
var imageObject = $("img.details").first();
var clonedObj = $(imageObject).clone();
clonedObj.height("250px").width("300px");
clonedObj.appendTo($("div#showImage"));
$(".details").click(function (event) {
//clone the clicked image
var clone = $(this).clone();
clone.height("250px").width("300px");
//place it in the placeholder
$('div#showImage').html(clone);
});
}
Backend code is asp.net mvc3 but I think that's not important here. For example purposes you can show me using html and css. Thanks
Update: That action that I want to bind onclick to cloned image inside showImage div can be alert message, for simplicity.