How To Add MooTools Featured Content Slider 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.

MooTools Featured Content Slider

<script src='mootools.svn.js' type='text/javascript'/>

&lt;script type=&quot;text/javascript&quot;&gt;
window.addEvent(&#39;domready&#39;, function(){
var totIncrement = 0;
var increment = 212;
var maxRightIncrement = increment*(-6);
var fx = new Fx.Style(&#39;slider-list&#39;, &#39;margin-left&#39;, {
duration: 1000,
transition: Fx.Transitions.Back.easeInOut,
wait: true
});

//-------------------------------------
// EVENTS for the button &quot;previous&quot;
$(&#39;previous&#39;).addEvents({
&#39;click&#39; : function(event){
if(totIncrement&lt;0){
totIncrement = totIncrement+increment;
fx.stop()
fx.start(totIncrement);
}
}
});

//-------------------------------------
// EVENTS for the button &quot;next&quot;
$(&#39;next&#39;).addEvents({
&#39;click&#39; : function(event){
if(totIncrement&gt;maxRightIncrement){
totIncrement = totIncrement-increment;
fx.stop()
fx.start(totIncrement);
}
}
})


});
&lt;/script&gt;


<style type='text/css'>
#slider-stage{width:100%; overflow:auto; overflow-x:hidden; overflow-y:hidden; height:200px; margin:0 auto; border:2px solid #000000; background-color:#000000; }
#slider-buttons{float:left; width:100%; margin:0 auto; border:2px solid #000000; color:#ffffff; font-weight:bold; background-color:#000000;filter:alpha(opacity=60);opacity:0.6;}
#slider-list{width:4500px; border:0; margin:0; padding:0; left:400px;}
#slider-list li{
list-style:none;
margin:0;
padding:0;
border:0;
margin-right:4px;
padding:4px;
background:#DEDEDE;
float:left;
width:200px;
height:200px;
}
</style>


Important !!! : Download mootools.svn.js as a zip file from here and host mootools.svn.js yourself.

You can change height,width,color,... if you like.

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.

<div id="slider-stage">

<ul id="slider-list">

<li id="l1"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-deTOtvuiM7nNm0a_RyjWXAkcBtESFE5VVAnSYp3zhMtKDCQWqCXRAeozIV8bOT1IBW7riuSjKxREqlyBTNulRHuIpuQzRJTRaiVIMXmpge7phdmpMzBVshEEOzILEMeksrJ_agab_Rda/" height="200"/></a></li>

<li id="l2"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbSEveH9zoMzbk4GjEfGnVBWM1EZZcn8m-wWBmlqPsuLX8iUiW4EkQUQlE8B8EKvEWAiOYi9LZXwOyWhyOYXZdhZRYwcYZxcJ51GmIqYK3M-U8rzNmeFF5HfPQTkzJkf1YeJbjMrT3OHpc/" height="200"/></a></li>

<li id="l3"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBZNBW_gCj7_r96jWu-sc8WLb4yX-586vWj1hNgRwBbQ4K_N-CcBoPZytgXbP9euG_85r0ww125-1r60KJHisHcnIAflc7WL2q87HnBKqoz591eOHpPan4WxeiDOv2XsjsTrPPCtMjgeBY/" height="200"/></a></li>

<li id="l4"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB5uk0KSQx04I6Uyqh2vdUE5LQ-aYRzPnvDSOWUWQKz-B3ArvySpU0AyHJYXNNKo6Bfrzk4K1tyXtR-l3YerESxXu7KywS3OgHCbOA-P14ddjPLsPdAg25BvQ1oXtgNj9nTR6mM4pK1GN5/" height="200"/></a></li>

<li id="l5"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFBuWZOGHTUWYspoPUktJti2tMdWTSUGnDSTA1TmhmPbEwYiU7aGZkMX6f6iXkOreWgQqJO5oS5ChLIF_vE-JGLA7Vb3hWieNn_a38uifXoTM_drwjIWkO6xoo7B2VffEmFYv311qdFk7t/" height="200"/></a></li>

<li id="l6"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7vWcGxKVD2yUtvJy9tOctXnP_AbRqVAaF_Z7pk_XybXg5GY_8ronMF8Wvm75uCFYoNcFJ8PsjLQzXxODOs4c2dT_5DAK9LKs0S8bKv2nQ_z7Umb6WNig_7ADpJG99VEaxC9TkoyHFmzT7/" height="200"/></a></li>

<li id="l7"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDoc7eeznsPWokguTjEesdOY6Ok0KKY3fInO8u4pvzSC8Nk7rwUUch_Jx0MJV2bM2-pFjZIYTqedvfNLMTogpKyCZkvpnJPOmGkxU99Zz5r0XpnhObDLxyvZO7WQbhaIr8MZJzknwnfGPn/" height="200"/></a></li>

<li id="l8"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3OKpfC2dxgv2yPwqeYOZQ7_A1z9E2dxRO102M-iJcSeT5pZA2BjETiwgK8UdyUl2j4O5N7yzvm_dSeKESWUERoS4R18_ge5DCiyLQTSGg1Wh4zfk6rT9rBxu8Y6uve4yEeEt2FJKKCmIG/" height="200"/></a></li>

<li id="l9"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH-ymCo5fSvbp6U22G0KoaTWlDe-fsa_2qhYB1m_7ZPwub18_DRqkLpBH_VfHCs8fOWGKauaeaLRPxPXdL4phfhIAEYoiQXeMIhgvolQBKtceWVGZQa0ecrSJCnDZHFWJjBkX5clTvEA5F/" height="200"/></a></li>

<li id="l10"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwT6ASB0qj_BXJBdmVkkH9ht0Uywp31L8IcCjZvlG5dLmiJl6zsTxb53K9q-W3g4ZJ5rhd29kfl_CKwUj7_Apto9dl_8KJDuzNoG6fjQcLyp0mym6mUxvapoc5AcInQRc-hNZ06S2n03MR/" height="200"/></a></li>

</ul>

</div>

<div id="slider-buttons">
<a id="previous" href="#">Previous</a> | <a id="next" href="#">Next</a>
</div>


You are done.

Demo

0 comments:

Post a Comment

 

Support By Blogger