Thursday, January 7, 2010

Add jQuery Image Zooming To Blogger

1.Login to your blogger dashboard--> layout- -> Edit HTML
2.Scroll down to where you see ]]></b:skin> tag .
3.Copy below code and paste it just after the ]]></b:skin> tag.

jQuery Image Zooming

<script src='jquery.js' type='text/javascript'/>
<script src='jquery.jqzoom.js' type='text/javascript'/>
<script type='text/javascript'>
jQuery.noConflict();
jQuery(document).ready(function(){
$(&quot;img.jqzoom&quot;).jqueryzoom({
  xzoom: 200, //zooming div default width(default width value is 200)
  yzoom: 200, //zooming div default width(default height value is 200)
  offset: 10 //zooming div default offset(default offset value is 10)
  //position: &quot;right&quot; //zooming div position(default position value is &quot;right&quot;)
 });
});
</script>

<style type='text/css'>
div.zoomdiv {
z-index                 : 100;
position                : absolute;
top:0px;
left:0px;
width                   : 200px;
height                  : 200px;
background: #ffffff;
border:1px solid #CCCCCC;
display:none;
text-align: center;
overflow: hidden;

}


img.jqzoom{
cursor:crosshair;
position:relative;

}
</style>


Important !!! : Download jquery.js and jquery.jqzoom.js as a zip file from here and host jquery.js and jquery.jqzoom.js yourself.

4.Now save your template.

5.Go to Layout-->Page Elements and click on "Add a gadget".

6.Select "html/java script" and add the code given below and click save.

<span class="tozoom"><img alt="LARGE-IMAGE-ADDRESS" src="SMALL-IMAGE-ADDRESS" class="jqzoom"/></span>


Look at the example below.

<span class="tozoom"><img alt="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRl_fgTPjw-KdJV6ggwbieZLDLxGk_KYr4GHg_NFWLkgDdx3V4vfjg-lrZkfCpdJSJABJNi86aKYEU70EFgURqaHrra367YacgNx9ByZ9rUWR17NGj-DrIGFkvFQCbpMUtJhdsBymmCF5_/+Zoom+Image+big.jpeg" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3rappsPd8DSQ3lUhvph0cvaxnLbgmSEoB0zeWnZy_yC6fxlUtq52nz3VhZMtrpN37yb1GoLKpzn-MHzlyiLnGWP5H3pR_tV_OCz4j0bPpxDocn7jTqFMuLHSJB-s5TXZ9yD-ifOAGaV6c/+Zoom+Image+small.jpg" class="jqzoom"/></span>


You are done.

2 Comments:

Local Download said...

Tukeran link yuk^^?

salam blogger:)

Unknown said...

hm....asik juga nih..Adik ku yang satu ini makin hebat aja...melaju dengan kecepatan tinggi...heheheh...

Post a Comment

 
top