i am using following way to open the image in light box but it opens the image which is selected i want that when i click any image it should open another images how to do this
<script type="text/javascript" >
$(document).ready(function(){
$(".linkbutton").click(function(){
var address= $(this).attr("src");
$("#popup").fadeIn("slow");
$("#lightbox").attr("src",address);
});
$("#close").click(function(){
$("#popup").fadeOut("fast");
});
});
</script>
Following in body
<div>
<img src="image/smallicon_2.png" class="linkbutton">
</div>
<div id="popup">
<div id="center">
<img id="lightbox" src="image/popup_page_1.png" >
<img id="close" src="images/close.png" alt="close" >
</div> <!-- #center -->
</div>