Lightbox is nice tool that offers a nice way to add zooming functionality for images. The basic structure is given below
1. HTML code
<a class="search-icon" href="img/portfolio/portfolio-1.jpg" data-lightbox="image-1">
data-lightbox for popup and
href image path is to popup the image.
know more about fancybox setting in this link – http://lokeshdhakar.com/projects/lightbox2/