Friday, April 30, 2010

How To Add MooTools Featured Content Slider to blogger













UPDATE: I updated some of my posts, this post I update 17+ Featured Content Slider for Blogger Using jQuery ..........





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.



<script src='http://keerthiset2.110mb.com/mootools%20slider/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/AVvXsEhwfkjP3UeidEZuqmCOEg9udpGZMG2LKCWzhXM0IntL0pmEkfMKy_Zwg9lhWCDm4pwIFZIMjG0gcdMYxxT-CXjW-0IfmXpfMYKBOtLzkO2JJz2VP_g9SrWs1rXTbf5JhRpxtqT7kPPWAEUS/" height="200"/></a></li>

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

<li id="l3"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZtH8hi0X7hNvS8sCSjzmK7by3L6VojgntuJ_WYMELN6lnHtjKG-8SWLTDNNAlVr_1-ocD_YrzjrGO7jPmmFOy3c0hBeTKqt9uE2thg5YpdFFdtP-pK3UdljNt5j9fmHLKckQeagXnHD-l/" height="200"/></a></li>

<li id="l4"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimwN-Nf4GzVmJfDvNRmFd18eZBIdVBTCFBoM4doo-8HyWmsWZvC5xXQhWRHeKCyyoM4xJC7ZcqbR8c_92OuTtMI6oC09CxTMsbBV3YmttrGkqqhu9Gdmnzwm5KCuNvPefufDn-n60OTaUY/" height="200"/></a></li>

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

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

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

<li id="l8"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-vj-ZaBazrbKPBmpnrQqsRflG1s-GXVQAcIfx8Gy4tiB2EB-qPkJqC4Ctkx8smo2jUBwBTDLnMKxjYQ-dC6tPG30FxS3cf8xa9TWtbZRcywj-cOKRD32pdcClc2g_OpSI_BZvIxO-EnvA/" height="200"/></a></li>

<li id="l9"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMnYAEryCFaINsRmhFS-rUn3qG6lQ66kqbAjTvwOcXXnN6FVGkiaJLxNbD3EvUivN62LpP_Q-RY08o_F-zIelpMQ4ltYqIzR34aH3cuKVwS-B6QPOEKq8MCiYoVP-JZw1V-TfrvKcH6BhH/" height="200"/></a></li>

<li id="l10"><a href="#" title="#"><img alt="#" width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKFoyZVtptZkjj1DRJP4dWnwexLKgtbP3Ytmx597LbzsnnfVYVZKDkn7TJInkk_e-L1KYN7yOJKrtwGaZcfprlXeeqT6WMDJ27z0lHR6lMcFI-Z-p1m3wDz2AYZwWsqYYDx19EGUJixLmm/" height="200"/></a></li>

</ul>

</div>

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






NOW CLICK SAVE TEMPLATE





No comments:

Post a Comment