Thursday, June 16, 2011

பிளாக்கரில் உள்ள image களை Zoom செய்யலாம்.

8:26 AM Posted by Mohamed Basith , No comments

Log in to Blogger and go to Layout -> Edit HTML
then, find (CTRL+F) this code in your template:


And immediately ABOVE/BEFORE it, paste this code:
<script src="" type="text/javascript"></script>
<script src="" type='text/javascript'></script>
<link rel="stylesheet" href="" type="text/css" />
<script type="text/javascript">

$(function() {
var options =
zoomWidth: 275,
zoomHeight: 275

var options2 =
zoomWidth: 275,
zoomHeight: 275,



Default width and height of zoom-window is fixed as 275x275 pixels. You may change the values if you want.

Save your template.

Now whenever you want to add this image-zoom effect to your images, simply add the class "jqzoom" to your a href tag.

So, if this is the usual code you use to display an image in your blog:

Now to implement the hack, the new code becomes:
<a href="DIRECT_LINK_TO_THE_LARGER_IMAGE" class="jqzoom" title="IMAGE_TITLE"><img src="DIRECT_LINK_TO_THE_SMALLER_IMAGE"/></a>

In the DEMO, this is the larger image used while this one is the thumb-nail.

NOTE #1: To display the images with Reverse Opacity Effect (second image in the DEMO), add class="jqzoom2" instead of class="jqzoom"

NOTE #2 (IMPORTANT): For this hack, you should have two sizes of the same image. The smaller image is displayed in the blog, and the larger image is hyperlinked to the smaller image (displayed in the floating window).
You may use any image-editor (MS-Paint/Adobe photoshop) to create the smaller thumbnail-image (displayed it in the blog posts).


Post a Comment