Plugin features:
>Lightbox-like interface (dark overlay, previous/next image switching)
>Highly customizable (CSS styling, custom HTML wrapper block)
>Images can be zoomed in with a fade-in effect or with rotation
>Provides API functions to zoom in and zoom out
>Lightweight — the packed version is less than 7KB
The plugin works in all major browsers, including Firefox 2+, Opera 9.5+, Google Chrome, Safari 3+, and Internet Explorer 6+.
Steps to Add it to Blogger:
1.Login to the Blogger account
2. Now Go to Design > Edit HTML.
3.Now search for the </head> tag and paste the following code just Above/Before it.
<link rel="stylesheet" type="text/css" href="http://dl.dropbox.com/u/27675057/jquery.imgzoom-0.2.1/css/imgzoom.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://dl.dropbox.com/u/27675057/jquery.imgzoom-0.2.1/scripts/jquery.imgzoom.js"></script>
2.Go to the Post/Page you want to add imgZoom and then go to Edit HTML tab .
3.Now copy the code from below and paste it there.
<link rel="stylesheet" type="text/css" href="http://dl.dropbox.com/u/27675057/jquery.imgzoom-0.2.1/css/imgzoom.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://dl.dropbox.com/u/27675057/jquery.imgzoom-0.2.1/scripts/jquery.imgzoom.js"></script>
Now When you see the codein the edit HTML window it would be something like this
< a href = "large3.jpg" >< img border= "0" height = "90" src = "/small3.jpg" width = "120" /></a> |
Make it like this
|
a class="img" href = "large3.jpg" >< img border = "0" height = "90" src = "/small3.jpg" width = "120" /></a> |
As you see we only added class="img" .Now add the following javascript snippet to link the two.
<script type="text/javascript">
$(function () {
$('#img').imgZoom({ showOverlay: true });
});
</script>
ImgZoom provides many options for customizing the javascript ,Here is a list of them:
Here is a customized javascript call :
<script type="text/javascript">
$(function () {
$('#img3').imgZoom({ showOverlay: true, rotate: true, duration: 1000 });
});
</script>
This options tells the image to do a 360 degree before appearing in the lightbox.The image will explain it a little.
5.Now save the Post/Page.
Note: Please Host all the files on free hosting service like DropBox or Blogspot itself!
Another Important thing to note is that all the images used in this tutorial like Next button ,Previous button ,etc are all hosted on Google Code service which are the fastest and most reliable servers on the internet with the least downtime.So you can easily implement this with no hassles for Image Hosting.
0 comments:
Post a Comment