If you want to add a very attractive gallery to your blog you should read this tutorial,
Through this tutorial, only 3 steps you’ll be able to make your own gallery widget with jQuery, to add it for your blogger blog,
you add add it to header, sidebar, above posts area, on footer columns, and any where else on your template,
So let’s see step one.
Step 1. Adding The Gallery Codes To Your Template.
Go To your blogger dashboard, layout >> Edit html >>And find this code,
]]></b:skin>And Before it, Add the next code,
/* Blogger Zoom Gallery By AllBlogTools.com */Then Find this Tag
ul.thumb {
float: left;
list-style: none;
margin: 0; padding: 10px;
width: 360px;
}
ul.thumb li {
margin: 0; padding: 5px;
float: left;
position: relative; /* Set the absolute positioning base coordinate */
width: 110px;
height: 110px;
}
ul.thumb li img {
width: 100px; height: 100px; /* Set the small thumbnail size */
-ms-interpolation-mode: bicubic; /* IE Fix for Bicubic Scaling */
border: 1px solid #ddd;
padding: 5px;
background: #f0f0f0;
position: absolute;
left: 0; top: 0;
}
ul.thumb li img.hover {
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEXON-uVh4pa0ROKkn0cW1fK5sGD-P0ZvwbupqRSXmPlUw1t4gZ9la7b3c9QC8K8v3ebz6BKH2FtCWIbHfDrR_wf7rR_HqVgzN6Ya7xPHAXhzYr9e0U0dMAznXNgmVI63gA1PizwCMerOT/) no-repeat center center; /* Image used as background on hover effect
border: none; /* Get rid of border on hover */
}
</head>And add the next code before it.
Now we finished editing template, Click Save template,
<script src='http://code.jquery.com/jquery-latest.js'
type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
//Larger thumbnail preview
$("ul.thumb li").hover(function() {
$(this).css({'z-index' : '10'});
$(this).find('img').addClass("hover").stop()
.animate({
marginTop: '-110px',
marginLeft: '-110px',
top: '50%',
left: '50%',
width: '174px',
height: '174px',
padding: '20px'
}, 200);
} , function() {
$(this).css({'z-index' : '0'});
$(this).find('img').removeClass("hover").stop()
.animate({
marginTop: '0',
marginLeft: '0',
top: '0',
left: '0',
width: '100px',
height: '100px',
padding: '5px'
}, 400);
});
//Swap Image on Click
$("ul.thumb li a").click(function() {
var mainImage = $(this).attr("href"); //Find Image Name
$("#main_view img").attr({ src: mainImage });
return false;
});
});
</script>
And lets see the next step.
Step 2. Adding The Gallery To your template.
Go to Layout >> page elements and on your template’s sidebar, header or footer Click on ‘Add a Gadget‘.then Select HTML/Javascript
A new window will appear, in title box Type your gallery title, and in content area Copy and Paste the next code
Then instead Of picture 1 Link Type Your Image Url,
<ul class="thumb">
<li><a href="#"><img src="picture 1 Link" alt="" /></a></li>
<li><a href="#"><img src="picture 2 Link" alt="" /></a></li>
<li><a href="#"><img src="picture 3 Link" alt="" /></a></li>
<li><a href="#"><img src="picture 4 Link" alt="" /></a></li>
</ul>
and if you want to make the image link to another page or url instead of # Add the target url.
Each time you want to add a new image to the gallery, just repeat this code.
<li><a href="URL 1 #"><img src="picture 1 Link" alt="" /></a></li>That’s it.
Demo. See How is this gallery looks like on a blogger blog.
Click Here To See Demo Blogger GalleryPlease share and leave comments if you find it useful.
To become IT networking professional, you can go for ccent certification which will give you title of Cisco certified entry networking technician while ccde will entitle you certified design expert and ccna will enhance your expertise as a certified network associate.
0 comments:
Post a Comment