I am looking out for plugins that can display a larger image when the user clicks on it. I am aware of lightbox. Any others to compare?
+1
A:
Jquery:
$(function(){
$("img").click(function(){
str = "<img src='"+$(this).attr('src')+"' />";
$("#img_div").html(str).fadeIn(1000);
})
$("#img_div").click(function(){
$(this).fadeOut(1000);
})
})
Css:
#img_div{
position:absolute;
display:none;
}
Html:
<div id="img_div"></div>
<img src="Backgrounds.png" width="100px">
Srikanth
2009-09-07 13:29:18