Thursday, 2 February 2012

How To Add Smart Jquery Featured Slider to Blogger/Websites

This is a another tutorial about, how to add great featured jquery content slider to your blogger blog or other website.Read the instruction given below to add this featured content slider to your blog with in few minutes.Remember to use 307px width and 254px height images for this slider. you can see theDEMO of this slider HERE.

1.Login to your blogger dashboard--> Design - -> Edit HTML.

2.Scroll down to where you see </head> tag .

3.Copy below code and paste it just before the </head> tag .

<script src='http://makingdifferent.googlecode.com/files/jquery-1.2.6.min.js' type='text/javascript'></script>
<script src='http://makingdifferent.googlecode.com/files/jquery.jcarousel.pack.js' type='text/javascript'></script>
<script src='http://makingdifferent.googlecode.com/files/jquery-ui-personalized-1.5.2.packed.js' type='text/javascript'></script>

<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
wrap:"both",
scroll:2,
animation:"slow"
});
function mycarousel_initCallback(carousel) {
jQuery('#featured-next-button').bind('click', function() {
carousel.next();
return false;
});

jQuery('#featured-prev-button').bind('click', function() {
carousel.prev();
return false;
});
jQuery('.button-nav span').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});
};
jQuery('#feature-carousel').jcarousel({
wrap:"both",
scroll:1,
auto:10,
initCallback: mycarousel_initCallback,
buttonNextHTML: null,
buttonPrevHTML: null
});

});
</script>

<style type="text/css">
.jcarousel-skin-tango .jcarousel-container {-moz-border-radius: 10px;}

.jcarousel-skin-tango .jcarousel-container-horizontal {width: 941px;margin: 0 auto;padding:0 20px;}

.jcarousel-skin-tango .jcarousel-clip-horizontal {width: 941px;height: 254px;}
.jcarousel-skin-tango .jcarousel-item {width: 307px;height: 254px;}
.jcarousel-skin-tango .jcarousel-item-horizontal {margin-right: 10px;}
.jcarousel-skin-tango .jcarousel-item-placeholder {background: #fff;color: #000;}

.jcarousel-skin-tango .jcarousel-next-horizontal {
background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY0sgFy9rfGMBkoMNNkcAXZr4bKNrzjqyU7ioCU8V7hx0CepJQSx5mCBcGkK-2_ZcuL7koILKXD_WP7OtvXXB5AcCboQ26olW42D5jBAFieOv5zs5yar1PkF4LF3qvYsmal7mo86TpeAZq/s1600/image-slider-button.png) no-repeat scroll -46px 0;
cursor:pointer;
height:254px;
right:20px;
position:absolute;
top:0;
width:46px;
}

.jcarousel-skin-tango .jcarousel-prev-horizontal {
background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY0sgFy9rfGMBkoMNNkcAXZr4bKNrzjqyU7ioCU8V7hx0CepJQSx5mCBcGkK-2_ZcuL7koILKXD_WP7OtvXXB5AcCboQ26olW42D5jBAFieOv5zs5yar1PkF4LF3qvYsmal7mo86TpeAZq/s1600/image-slider-button.png) no-repeat scroll 0 0;
cursor:pointer;
height:254px;
left:20px;
position:absolute;
top:0;
width:46px;
}

.jcarousel-container {position: relative;}
.jcarousel-clip {z-index: 2;padding: 0;margin: 0;overflow: hidden;position: relative;}
.jcarousel-list {z-index: 1;overflow: hidden;position: relative;top: 0;left: 0;margin: 0;padding: 0;}
.jcarousel-list li,.jcarousel-item {float: left;list-style: none;width: 75px;height: 75px;}
.jcarousel-next {z-index: 3;display: none;}
.jcarousel-prev {z-index: 3;display: none;}

#news-slider{background-color:#FFFFFF;padding:20px 0;}
#news-slider img{border:none;height:254px;width:307px;}
</style>


4.Now save your template.

5.Go to Layout --> Page Elements.

6.Click on 'Add a Gadget'.

7.Select 'HTML/Javascript' and add the code given below:


<div id='news-slider'>
<ul class='jcarousel-skin-tango' id='mycarousel'>
<li><a href='SLIDE-1-LINK-HERE'><img src='SLIDE-1-IMAGE-ADDRESS-HERE'/></a></li>
<li><a href='SLIDE-2-LINK-HERE'><img src='SLIDE-2-IMAGE-ADDRESS-HERE'/></a></li>
<li><a href='SLIDE-3-LINK-HERE'><img src='SLIDE-3-IMAGE-ADDRESS-HERE'/></a></li>
<li><a href='SLIDE-4-LINK-HERE'><img src='SLIDE-4-IMAGE-ADDRESS-HERE'/></a></li>
<li><a href='SLIDE-5-LINK-HERE'><img src='SLIDE-5-IMAGE-ADDRESS-HERE'/></a></li>
</ul>
</div>




NOTE : Replace,

SLIDE-X-LINK-HERE with your real featured posts links.

SLIDE-X-IMAGE-ADDRESS-HERE with your real slide images addresses.

Look at the example below:

<div id='news-slider'>
<ul class='jcarousel-skin-tango' id='mycarousel'>
<li><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9NK7zy04vwOTL-M0XKjmZKFZk-lGYJzDTeQbLxNVeL84UXUn8pbfOMZIOuZKiPwn-ccWPtNh_EVQ7guwavOfQk_56yi3t84jNPsydMhFHgGdibqJLFDcjL6x5RuBfO92v22Ffzb_a15TV/s1600/%2528gj37765.blogspot.com%2529slide1.jpg'/></a></li>
<li><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikTcVTCGZNjBmaCHkN-PaIQ8eg_AAIS03NIu4MlI-2HaiHcR4UKt5y0BQ9yWCbz8sJq6DYNk77CgZ4r3Xvh2iahD3LC_zfg1lxzpvC2iVErcTC6wEtjAaMkZeA6C2xJr4M7L0VPdE1hrJ-/s1600/%2528gj37765.blogspot.com%2529slide2.jpg'/></a></li>
<li><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6zV0KwhrDmW5ztkd44mYNmeKxb6Q3fJBVlVKUVVrCicQGmuGGNO8C7NYbEPRcA5BW0m3BU-zf4ia0_uhS3yWDVp5Ii3W8l2z1qf6J84vqHhn7s1-mk7gXpfxbW9vxhhQ05Vn9zEcTAX6/s1600/%2528gj37765.blogspot.com%2529slide3.jpg'/></a></li>
<li><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_PpmkCvQ0fG3mOcdPhAB6UkNmouN671sreYHqKgq4o_CWZFCxkwUrFXswZSxjXXvu05J9BP1Fora7ljIUiDeJDCX-QJ7AiyzH-wHZ3TlzphzlABlC13Ll2eEZu0ui3OKpLlpRe1mj7fT/s1600/%2528gj37765.blogspot.com%2529slide4.jpg'/></a></li>
<li><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTgR6sBxeAL489d97i0HMISiLiRJ3V17dhjzVQicO3MqDDDhSV5m6O8rYgw9jE0f7MGPtO0K0jzxWzANCziE31Nt0kn6wDH0zJoGgxFbLKOQ21JRZttZX_RtbwaozYg-riQzJvMJGy6aNj/s1600/%2528gj37765.blogspot.com%2529slide5.jpg'/></a></li>
</ul>
</div>




Reference/Source : http://gj37765.blogspot.com/2011/03/how-to-add-smart-jquery-featured-slider.html




1 comments:


  1. Im no expert, but I believe you just made an excellent You certainly understand what youre speaking about, and I can truly get behind that.
    Regards,
    Angularjs training in chennai

    ReplyDelete