Attach your photo in a div and add Zoom using CSS on the hover. You can increase the z-index when freezing. You can add to CSS below to enlarge / enlarge the image of the enlarged image. If you don't want to reinvent the wheel, check out some jQuery plugin that can do the same in an elegant way with less effort.
CSS
#div-1 { position: absolute; } #div-1.hover { position: absolute; zoom: 70%; border: solid 1px; z-index:10; }
Jquery / javascript:
<script type = "text/javascript"> $(document).ready(function() { $(".div-1").onmouseover(function() { toggle_visibility('div-1'); }) function toggle_visibility(id) { var e = document.getElementById(id); if ($(e).hasClass("hover")) { $(e).removeClass("hover"); } else { $($(e)).addClass("hover"); $($(e)).attr({ width: "100%", height: "100%" }); } }}); < /script>
Piyush tattoo
source share